New to profiling: dmd -profile; ldc2 --fdmd-trace-functions

2023-03-31 Thread Paul via Digitalmars-d-learn
dc2 --fdmd-trace-functions myprog.d** **dmd -profile myprog.d** The result is that no 'trace' files are generatedas far as I can tell. When I run myprog.exe it generates no errors, runs very quickly, and does not do what it previously was doing. **ldc2 --version** **LDC - the LLV

Re: does dmd --build=profile-gc work with core.stdc.stdlib.exit()?

2022-11-13 Thread mw via Digitalmars-d-learn
On Sunday, 13 November 2022 at 19:02:29 UTC, mw wrote: BTW, can --build=profile-gc can intercept "Ctrl+C" and generate *partial* report file? And what's the suggested proper way to do Is there a profile-gc plugin function I can call in the middle of my program to generate *

Re: does dmd --build=profile-gc work with core.stdc.stdlib.exit()?

2022-11-13 Thread mw via Digitalmars-d-learn
On Sunday, 13 November 2022 at 18:51:17 UTC, mw wrote: On Sunday, 13 November 2022 at 18:48:42 UTC, mw wrote: BTW, can --build=profile-gc can intercept "Ctrl+C" and generate *partial* report file? And what's the suggested proper way to do early exit, and still let --build=prof

Re: does dmd --build=profile-gc work with core.stdc.stdlib.exit()?

2022-11-13 Thread mw via Digitalmars-d-learn
On Sunday, 13 November 2022 at 18:48:42 UTC, mw wrote: BTW, can --build=profile-gc can intercept "Ctrl+C" and generate *partial* report file? And what's the suggested proper way to do early exit, and still let --build=profile-gc generate reports? I tried presss "Ctrl

does dmd --build=profile-gc work with core.stdc.stdlib.exit()?

2022-11-13 Thread mw via Digitalmars-d-learn
dering does dmd --build=profile-gc work with core.stdc.stdlib.exit()? And where is the output report file, and the filename? I didn't see any report file generated in the current working dir. BTW, can --build=profile-gc can intercept "Ctrl+C" and generate *partial* report fi

Re: How to profile compile times of a source code?

2021-08-08 Thread Vladimir Panteleev via Digitalmars-d-learn
On Saturday, 30 January 2021 at 22:47:39 UTC, Ahmet Sait wrote: I'm looking for ways to figure out what parts of the code slows down the compiler other than brute force trial. You could try some of the tools listed on the wiki for build time profiling: https://wiki.dlang.org/Development_tool

Re: How to profile compile times of a source code?

2021-01-31 Thread Johan via Digitalmars-d-learn
On Sunday, 31 January 2021 at 16:39:12 UTC, Boris Carvajal wrote: On Sunday, 31 January 2021 at 16:13:24 UTC, Anonymouse wrote: Does ldc produce traces in a format that Tracy supports? I can't seem to open the generated *.time-trace files with it. (tracy 0.7.5-1 installed from Arch Linux AUR.)

Re: How to profile compile times of a source code?

2021-01-31 Thread Boris Carvajal via Digitalmars-d-learn
On Sunday, 31 January 2021 at 16:13:24 UTC, Anonymouse wrote: On Sunday, 31 January 2021 at 12:31:59 UTC, Johan Engelen wrote: Try LDC 1.25 (now in beta testing) with --ftime-trace. Clang has the same option, so you can read more about it online in that context. Be sure to check out the related

Re: How to profile compile times of a source code?

2021-01-31 Thread Anonymouse via Digitalmars-d-learn
On Sunday, 31 January 2021 at 12:31:59 UTC, Johan Engelen wrote: Try LDC 1.25 (now in beta testing) with --ftime-trace. Clang has the same option, so you can read more about it online in that context. Be sure to check out the related commandline flags. I recommend the Tracy UI to look at traces

Re: How to profile compile times of a source code?

2021-01-31 Thread Imperatorn via Digitalmars-d-learn
On Sunday, 31 January 2021 at 12:31:59 UTC, Johan Engelen wrote: On Sunday, 31 January 2021 at 12:16:50 UTC, Imperatorn wrote: On Saturday, 30 January 2021 at 23:34:50 UTC, Stefan Koch wrote: [...] Interesting. Is this something that we could get into dmd with a switch? 🤔 Try LDC 1.25 (now

Re: How to profile compile times of a source code?

2021-01-31 Thread Johan Engelen via Digitalmars-d-learn
On Sunday, 31 January 2021 at 12:16:50 UTC, Imperatorn wrote: On Saturday, 30 January 2021 at 23:34:50 UTC, Stefan Koch wrote: On Saturday, 30 January 2021 at 22:47:39 UTC, Ahmet Sait wrote: [...] I have a way of getting the profile data your are after. Get the dmd_tracing_20942 branch from

Re: How to profile compile times of a source code?

2021-01-31 Thread Imperatorn via Digitalmars-d-learn
On Saturday, 30 January 2021 at 23:34:50 UTC, Stefan Koch wrote: On Saturday, 30 January 2021 at 22:47:39 UTC, Ahmet Sait wrote: [...] I have a way of getting the profile data your are after. Get the dmd_tracing_20942 branch from https://github.com/UplinkCoder/dmd Compile that version of

Re: How to profile compile times of a source code?

2021-01-30 Thread Stefan Koch via Digitalmars-d-learn
. Alternative I recommend using callgrind to profile where dmd spents most of it's time. For that to be useful you need a debug build of dmd though.

Re: How to profile compile times of a source code?

2021-01-30 Thread Stefan Koch via Digitalmars-d-learn
if my bottleneck is ctfe or templates? How do the compiler devs approach this issue? I'm interested in all kinds of tricks to the point of debugging the compiler itself although anything less complicated would be appreciated. I have a way of getting the profile data your are after. Get the dmd_tra

How to profile compile times of a source code?

2021-01-30 Thread Ahmet Sait via Digitalmars-d-learn
I'm looking for ways to figure out what parts of the code slows down the compiler other than brute force trial. Can I use -vtemplates switch for this? Would -v (verbose) switch helpful in some way? How would I know if my bottleneck is ctfe or templates? How do the compiler devs approach this iss

Re: Is there a way to benchmark/profile portably?

2020-05-07 Thread Dukc via Digitalmars-d-learn
On Thursday, 7 May 2020 at 10:51:27 UTC, Simen Kjærås wrote: If I understand correctly, you want to measure how many cycles pass, rather than clock time? Something like that. Well, I would also like to eliminate differences based on different memory caches between machines. In addition, if

Re: Is there a way to benchmark/profile portably?

2020-05-07 Thread Dukc via Digitalmars-d-learn
On Thursday, 7 May 2020 at 11:06:17 UTC, Dennis wrote: You can make a reference program that you use to get a measure for how fast the computer is that you run the benchmark on. Then you can use that to scale your actual benchmark results. When testing regressions there's a fairly obvious ch

Re: Is there a way to benchmark/profile portably?

2020-05-07 Thread Dennis via Digitalmars-d-learn
On Thursday, 7 May 2020 at 10:21:07 UTC, Dukc wrote: Is there some way to measure the performance of a function so that the results will be same in different computers (all x86, but otherwise different processors)? I'm thinking of making a test suite that could find performance regressions aut

Re: Is there a way to benchmark/profile portably?

2020-05-07 Thread Simen Kjærås via Digitalmars-d-learn
On Thursday, 7 May 2020 at 10:21:07 UTC, Dukc wrote: Is there some way to measure the performance of a function so that the results will be same in different computers (all x86, but otherwise different processors)? I'm thinking of making a test suite that could find performance regressions aut

Is there a way to benchmark/profile portably?

2020-05-07 Thread Dukc via Digitalmars-d-learn
Is there some way to measure the performance of a function so that the results will be same in different computers (all x86, but otherwise different processors)? I'm thinking of making a test suite that could find performance regressions automatically. I figured out Bochs[1] could be used for

How to use -profile when I initialize D-runtime myself?

2020-01-15 Thread Robert M. Münch via Digitalmars-d-learn
Hi, I had a related question in the "Does -profile need the D runtime?" thread. Since D runtime is required for profile to work, the question is how can I use profile when initializing it myself? -- Robert M. Münch http://www.saphirion.com smarter | better | faster

Issue with --build=profile

2019-10-18 Thread drkameleon via Digitalmars-d-learn
I'm working on a rather big project which I'm compiling with DMD/LDC. The thing is when I'm trying to profile it, using `dub build --build=profile`, weird issues keep popping up, coming from the project's dependencies... eg. "Warning: statement is not reachable&quo

Re: Does -profile need the D runtime?

2019-05-19 Thread Robert M. Münch via Digitalmars-d-learn
On 2019-05-18 17:46:52 +, Stefan Koch said: On Saturday, 18 May 2019 at 16:35:44 UTC, Robert M. Münch wrote: I want to profile my windows app which has a WinMain(). One of the first statements in WinMain() within a try{} is: Runtime.initialize(); But when I compile my app with -profile

Re: Does -profile need the D runtime?

2019-05-18 Thread Stefan Koch via Digitalmars-d-learn
On Saturday, 18 May 2019 at 16:35:44 UTC, Robert M. Münch wrote: I want to profile my windows app which has a WinMain(). One of the first statements in WinMain() within a try{} is: Runtime.initialize(); But when I compile my app with -profile, it crashes on entry of WinMain(). Looks like

Does -profile need the D runtime?

2019-05-18 Thread Robert M. Münch via Digitalmars-d-learn
I want to profile my windows app which has a WinMain(). One of the first statements in WinMain() within a try{} is: Runtime.initialize(); But when I compile my app with -profile, it crashes on entry of WinMain(). Looks like this function is instrumented with code, that might need the D

Re: Aliasing a mixin (or alternative ways to profile a scope)

2019-03-10 Thread Simon via Digitalmars-d-learn
On Saturday, 9 March 2019 at 09:12:13 UTC, Dennis wrote: On Friday, 8 March 2019 at 11:42:11 UTC, Simon wrote: Thanks, this works flawlessly. Out of interest: what is the "enum" doing there? I had the exact same behaviour in a function before, that I only called at compile-time, so why did it

Re: Aliasing a mixin (or alternative ways to profile a scope)

2019-03-09 Thread Dennis via Digitalmars-d-learn
On Friday, 8 March 2019 at 11:42:11 UTC, Simon wrote: Thanks, this works flawlessly. Out of interest: what is the "enum" doing there? I had the exact same behaviour in a function before, that I only called at compile-time, so why did it complain then? Can I somehow tell the compiler that a fun

Re: Aliasing a mixin (or alternative ways to profile a scope)

2019-03-08 Thread Simon via Digitalmars-d-learn
On Thursday, 7 March 2019 at 21:50:17 UTC, Johannes Loher wrote: ``` enum profile_scope(string name) = "import core.stdc.stdio : printf; printf(\"" ~ name ~ "\n\"); scope(exit) printf(\"" ~ name ~ "\n\");"; extern (C) void main() { mixin(profile_scope!"func1"); } ``` This uses string

Re: Aliasing a mixin (or alternative ways to profile a scope)

2019-03-07 Thread Johannes Loher via Digitalmars-d-learn
Am 07.03.19 um 22:50 schrieb Johannes Loher: > [...] As a small addition, if you always want to pass the function name as a parameter, you can simplify this to the following: ``` enum profile_scope(string name = __FUNCTION__) = "import core.stdc.stdio : printf; printf(\"" ~ name ~ "\n\"); sco

Re: Aliasing a mixin (or alternative ways to profile a scope)

2019-03-07 Thread Johannes Loher via Digitalmars-d-learn
Am 07.03.19 um 22:21 schrieb Simon: > > Is there a way to achieve this while compiling with -betterC? I use a > custom string struct right now, and your version needs TypeInfo, > concatening using ~ needs the garbage collector. I have the feeling D is > really not agreeing with the way I want to d

Re: Aliasing a mixin (or alternative ways to profile a scope)

2019-03-07 Thread Simon via Digitalmars-d-learn
On Thursday, 7 March 2019 at 20:34:48 UTC, Johannes Loher wrote: auto profile_scope(string name) { import std.format : format; return q{import std.stdio : writeln; writeln("%1$s"); scope(exit) writeln("%1$s");}.format(name); } void main() { mixin(profile_scope("func1")); } Is th

Re: Aliasing a mixin (or alternative ways to profile a scope)

2019-03-07 Thread Johannes Loher via Digitalmars-d-learn
Am 07.03.19 um 21:07 schrieb Simon: > Hello, > > I am currently porting the frontend of my instrumenting profiler to D. > It features a C++-makro that profiles the time between entering and > leaving a scope (achieved with con-/destructors in C++). Since D has > scopeguards, I hoped to achieve thi

Re: Aliasing a mixin (or alternative ways to profile a scope)

2019-03-07 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 7 March 2019 at 20:07:27 UTC, Simon wrote: measure("func1"); scope(exit) measure("func1"); I would suggest just using a struct. Make its constructor do the first measure, and its destructor do the second measure. I betcha you can avoid mixin entirely.

Aliasing a mixin (or alternative ways to profile a scope)

2019-03-07 Thread Simon via Digitalmars-d-learn
Hello, I am currently porting the frontend of my instrumenting profiler to D. It features a C++-makro that profiles the time between entering and leaving a scope (achieved with con-/destructors in C++). Since D has scopeguards, I hoped to achieve this by creating a mixin that generates the fo

Re: Understanding gc memory profile report

2017-09-08 Thread Ali Çehreli via Digitalmars-d-learn
t: ptr: 7FD9B63CD000, capacity: 255, length: 250 ptr: 7FD9B63CD000, capacity: 255, length: 251 > I compiled it with 'dmd test.d -profile=gc' > > After running it, the profile report was :- > > bytes allocated, allocations, type, function, file:line >

Understanding gc memory profile report

2017-09-08 Thread John Burton via Digitalmars-d-learn
writeln(array.length, " elements ", array); } I compiled it with 'dmd test.d -profile=gc' After running it, the profile report was :- bytes allocated, allocations, type, function, file:line 2000 1 int[] D main test.d:5

Re: Can compiler profile itself?

2017-01-25 Thread Profile Anaysis via Digitalmars-d-learn
On Wednesday, 25 January 2017 at 12:49:05 UTC, Stefan Koch wrote: On Tuesday, 24 January 2017 at 23:25:12 UTC, Profile Anaysis wrote: I am trying to compile some code and it takes around 6 seconds. Even if I change one line in one module, it takes the same time. There are about 20 different d

Re: Can compiler profile itself?

2017-01-25 Thread Stefan Koch via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 23:25:12 UTC, Profile Anaysis wrote: I am trying to compile some code and it takes around 6 seconds. Even if I change one line in one module, it takes the same time. There are about 20 different d modules. [...] yes the compiler can be used to profile itself

Can compiler profile itself?

2017-01-24 Thread Profile Anaysis via Digitalmars-d-learn
seems that something has made things slow. Can we ask the compiler what seems to be taking the most time(a module, a template, etc...)? If the compiler can profile itself then it would be very easy to figure out what is slowing things down in compilation. I feel that I should be able to

Profile ldc2

2016-04-07 Thread jmh530 via Digitalmars-d-learn
I like how dmd has the -profile switch, but I'm not sure how to go about profiling ldc2. I don't see any compiler flags in the -help. I'm also using Windows, if that matters, but if the best options are on Linux, I can dual-boot.

Re: Profile Ouput

2015-07-15 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 14 July 2015 at 13:35:40 UTC, Mike Parker wrote: -- 4000 _Dmain _D4main6selectFZk 40002736471 4000 _D3std6random27__T7uniformVAyaa2_5b29TkTkZ7uniformFNfkkZk -- Got it now. The 2736 and 471 are the call tree time

Re: Profile Ouput

2015-07-15 Thread Mike Parker via Digitalmars-d-learn
On Wednesday, 15 July 2015 at 18:02:11 UTC, jmh530 wrote: I've been confused by this too. The only thing I can find is this http://www.digitalmars.com/ctg/trace.html I think it would be cool to write something that takes the output and puts it in a prettier format. Yeah, I eventually stumb

Re: Profile Ouput

2015-07-15 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 15 July 2015 at 11:47:53 UTC, Mike Parker wrote: On Tuesday, 14 July 2015 at 13:35:40 UTC, Mike Parker wrote: -- 4000 _Dmain _D4main6selectFZk 40002736471 4000 _D3std6random27__T7uniformVAyaa2_5b29TkTkZ7uniformFNfkkZk --

Re: Profile Ouput

2015-07-15 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 14 July 2015 at 13:35:40 UTC, Mike Parker wrote: -- 4000 _Dmain _D4main6selectFZk 40002736471 4000 _D3std6random27__T7uniformVAyaa2_5b29TkTkZ7uniformFNfkkZk -- OK, I've finally realized that the top part of trace.

Profile Ouput

2015-07-14 Thread Mike Parker via Digitalmars-d-learn
Perhaps my googlefu has failed me, but I can find anything describing the output of DMD's -profile switch. I get that trace.def is a list of all functions called and I understand the table at the bottom of trace.log. What I'm not sure about is everything above the table in trace.

Re: core.atomic and -profile switch

2014-04-02 Thread bearophile
Saurabh Das: I see. I wasn't sure - hence I asked. https://d.puremagic.com/issues/show_bug.cgi?id=11471 In general, how do I check if this is a known issue? Search in Bugzilla and/or ask to people. Bye, bearophile

Re: core.atomic and -profile switch

2014-04-02 Thread Saurabh Das
throw Is there a workaround for this? I have a decent sized codebase which I wish to profile for hotspots - but it won't compile with '-profile'. Isn't this a recent regression? Bye, bearophile

Re: core.atomic and -profile switch

2014-04-02 Thread bearophile
Saurabh Das: With error: /usr/include/dmd/druntime/import/core/atomic.d(910): Error: asm statements are assumed to throw Is there a workaround for this? I have a decent sized codebase which I wish to profile for hotspots - but it won't compile with '-profile'. Isn&

core.atomic and -profile switch

2014-04-02 Thread Saurabh Das
Hello For this test program ('test.d'): import core.atomic; int func1(shared int a) { return atomicLoad(a); } These invocations of dmd succeed: 1. dmd -main test.d 2. dmd -main -debug test.d 3. dmd -main -release test.d But this one fails: dmd -main -profile test.d With e

Re: Strange behaviour with -profile

2014-02-24 Thread Jesse Phillips
-release -w danode/server.d if I compile with the -profile switch, I get a weird error: $ rdmd --build-only -O -gc -release -profile -w danode/server.d "Warning: statement is not reachable" I thought DMD provided an error if you tried to optimize with debug symbols. -O should n

Re: Strange behaviour with -profile

2014-02-23 Thread Jesse Phillips
On Sunday, 23 February 2014 at 08:32:50 UTC, Danny Arends wrote: I have a medium sized project at: https://github.com/DannyArends/DaNode it compiles fine with the normal build switches I used: $ rdmd --build-only -O -gc -release -w danode/server.d if I compile with the -profile switch, I

Strange behaviour with -profile

2014-02-23 Thread Danny Arends
I have a medium sized project at: https://github.com/DannyArends/DaNode it compiles fine with the normal build switches I used: $ rdmd --build-only -O -gc -release -w danode/server.d if I compile with the -profile switch, I get a weird error: $ rdmd --build-only -O -gc -release

Re: Error when trying to compile with --profile.

2013-10-31 Thread Dmitry Olshansky
31-Oct-2013 13:28, bearophile пишет: Wolftein: Using --debug or --release works fine. But when i use --profile i get: c:\Program Files (x86)\DLang\dmd2\windows\bin\..\..\src\phobos\std\path.d(2187): Error: balancedParens is not nothrow c:\Program Files (x86)\DLang\dmd2\windows\bin\..\..\src

Re: Error when trying to compile with --profile.

2013-10-31 Thread bearophile
Wolftein: Using --debug or --release works fine. But when i use --profile i get: c:\Program Files (x86)\DLang\dmd2\windows\bin\..\..\src\phobos\std\path.d(2187): Error: balancedParens is not nothrow c:\Program Files (x86)\DLang\dmd2\windows\bin\..\..\src\phobos\std\path.d(2188): Error

Error when trying to compile with --profile.

2013-10-30 Thread Wolftein
Using --debug or --release works fine. But when i use --profile i get: c:\Program Files (x86)\DLang\dmd2\windows\bin\..\..\src\phobos\std\path.d(2187): Error: balancedParens is not nothrow c:\Program Files (x86)\DLang\dmd2\windows\bin\..\..\src\phobos\std\path.d(2188): Error

Re: -profile and nothrow

2013-10-29 Thread Paolo Invernizzi
On Monday, 28 October 2013 at 18:34:51 UTC, Dicebot wrote: Any difference in semantics between -profile and normal flow is a bug, so, yes, please report to bugzilla. Done: http://d.puremagic.com/issues/show_bug.cgi?id=11375

Re: -profile and nothrow

2013-10-28 Thread Dicebot
Any difference in semantics between -profile and normal flow is a bug, so, yes, please report to bugzilla.

Re: -profile and nothrow

2013-10-28 Thread Paolo Invernizzi
Reduced: module b; class B { this() {} } module a; import b; class C : B {} class D(X) : X {} alias D!(C) HtmlPanel; dmd -profile a.d Error: 'a.C.this' is not no throw Everything is ok without the profile... may I post a bug report

-profile and nothrow

2013-10-28 Thread Paolo Invernizzi
Hi all, Compiling my application with 2.064.beta.4 and 2.063.2 with the "-profile" switch, I have an error like: Error: 'foo.ui.Widgets.this' is not no throw I've read something similar involving contracts, but this seems something different. Of course everyth

Re: How do you profile your apps under windows?

2013-08-11 Thread Alexandr Druzhinin
10.08.2013 01:30, Gary Willoughby пишет: On Friday, 9 August 2013 at 16:39:41 UTC, Alexandr Druzhinin wrote: -profile switch doesn't work for me (nothing happens), so I'm curious how to profile? I had the same problem on Linux where -profile didn't seem to produce anything.

Re: How do you profile your apps under windows?

2013-08-11 Thread Alexandr Druzhinin
10.08.2013 00:59, H. S. Teoh пишет: On Fri, Aug 09, 2013 at 11:39:41PM +0700, Alexandr Druzhinin wrote: -profile switch doesn't work for me (nothing happens), so I'm curious how to profile? You've to run your program first. It will create a bunch of extra files in your

Re: How do you profile your apps under windows?

2013-08-09 Thread Richard Webb
The Very Sleepy profiler works ok (if you run the apps through cv2pdb to get the debug symbols in the right format at least)

Re: How do you profile your apps under windows?

2013-08-09 Thread Gary Willoughby
On Friday, 9 August 2013 at 16:39:41 UTC, Alexandr Druzhinin wrote: -profile switch doesn't work for me (nothing happens), so I'm curious how to profile? I had the same problem on Linux where -profile didn't seem to produce anything. I had a program which ran an infinite loo

Re: How do you profile your apps under windows?

2013-08-09 Thread Dmitry Olshansky
09-Aug-2013 20:39, Alexandr Druzhinin пишет: -profile switch doesn't work for me (nothing happens), so I'm curious how to profile? My take is to compile with -g and use say AMD CodeAnalyst (or Intel's analog). Works quite well even though all symbols are mangled. With -

Re: How do you profile your apps under windows?

2013-08-09 Thread H. S. Teoh
On Fri, Aug 09, 2013 at 11:39:41PM +0700, Alexandr Druzhinin wrote: > -profile switch doesn't work for me (nothing happens), so I'm > curious how to profile? You've to run your program first. It will create a bunch of extra files in your current working directory that contain

How do you profile your apps under windows?

2013-08-09 Thread Alexandr Druzhinin
-profile switch doesn't work for me (nothing happens), so I'm curious how to profile?

how to profile compilation steps?

2013-07-11 Thread Timothee Cour
I'd like to at least get timestamps for the various steps appearing the the dmd -v output. Is there an easy way to modify dmd to output that? That could be fed to a D function that parses it and generates a nice profile report (ie the compiler would do not much more than just adding times

Re: -profile

2013-06-07 Thread bearophile
Anthony Goins: What is the error here :) 1. dmd profiletest.d should fail because balancedParens is not nothrow even though it is called from a contract. 2. dmd -profile profiletest.d should succeed because nothrow, @safe, pure don't apply to contracts I think -profile an

Re: -profile

2013-06-07 Thread bearophile
Anthony Goins: Is this even worth a bug report? http://d.puremagic.com/issues/show_bug.cgi?id=10295 Bye, bearophile

Re: -profile

2013-06-07 Thread Anthony Goins
he forums. One more question though... What is the error here :) 1. dmd profiletest.d should fail because balancedParens is not nothrow even though it is called from a contract. 2. dmd -profile profiletest.d should succeed because nothrow, @safe, pure don't apply to contracts

Re: -profile

2013-06-07 Thread bearophile
Anthony Goins: Is this even worth a bug report? Yes, it's worth a bug report in Bugzilla, it's a (small) Phobos Bug. I confirmed its presence. Bye, bearophile

Re: -profile

2013-06-07 Thread Anthony Goins
On Friday, 7 June 2013 at 23:42:58 UTC, Anthony Goins wrote: On Friday, 7 June 2013 at 21:39:26 UTC, bearophile wrote: Anthony Goins: Simple question is why? I am compiling this code with -profile, and I don't see errors: import std.string: balancedParens; void main() { a

Re: -profile

2013-06-07 Thread Anthony Goins
On Friday, 7 June 2013 at 21:39:26 UTC, bearophile wrote: Anthony Goins: Simple question is why? I am compiling this code with -profile, and I don't see errors: import std.string: balancedParens; void main() { assert(balancedParens("[[]]", '[', ']')

Re: -profile

2013-06-07 Thread bearophile
Anthony Goins: Simple question is why? I am compiling this code with -profile, and I don't see errors: import std.string: balancedParens; void main() { assert(balancedParens("[[]]", '[', ']')); } Bye, bearophile

Re: -profile

2013-06-07 Thread bearophile
Anthony Goins: Simple question is why? Looks like a little compiler bug. Please create a minimal example that shows the problem. If it's a real problem then it's for Bugzilla. Bye, bearophile

-profile

2013-06-07 Thread Anthony Goins
Compiling with -profile and without -release Gives the following error (not exactly but the best I can recall) balancedParens is not nothrow safe pure With -release and -profile all is fine. Builds fine without -profile. Simple question is why?

Reading results from dmd -profile

2012-10-28 Thread cal
I am trying to read the text file (trace.log) created by running the dmd profiler on some code, so that I can use demangle to make the output a bit more readable. I can read it in as a char[], but the whenever I try any string ops I get an exception because there are invalid UTF-8 sequences in

profiling with -profile

2012-07-26 Thread Minas Mina
I have this code: import std.stdio; void main() { f(); g(); } void f() { writeln("f()"); } void g() { writeln("g()"); } I compile with the command: dmd test.d -profile Then I execute it. It prints: f() g() as expected. Shouldn&

Re: profiling with -profile

2012-07-26 Thread Minas Mina
Sorry, I just saw the generated file... :p

Re: GUI or more human readable -profile data?

2012-02-29 Thread Jonathan M Davis
On Thursday, March 01, 2012 00:17:55 Robert Clipsham wrote: > Just as a side note, -profile doesn't work with multi-threaded > applications, so using some other profiler would probably be a better > bet anyway. It doesn't work with 64-bit programs either. - Jonathan M Davis

Re: GUI or more human readable -profile data?

2012-02-29 Thread Robert Clipsham
On 29/02/2012 21:30, simendsjo wrote: On Wed, 29 Feb 2012 22:28:29 +0100, Robert Clipsham wrote: On 29/02/2012 19:41, simendsjo wrote: http://www.digitalmars.com/ctg/trace.html Has someone made some GUI/pretty printing/dump to database or other tools to make the profile data a bit simpler

Re: GUI or more human readable -profile data?

2012-02-29 Thread Andrej Mitrovic
Boom: https://bitbucket.org/stqn/profiled I've never used it though.

Re: GUI or more human readable -profile data?

2012-02-29 Thread simendsjo
On Wed, 29 Feb 2012 22:28:29 +0100, Robert Clipsham wrote: On 29/02/2012 19:41, simendsjo wrote: http://www.digitalmars.com/ctg/trace.html Has someone made some GUI/pretty printing/dump to database or other tools to make the profile data a bit simpler to digest? If you're on Window

Re: GUI or more human readable -profile data?

2012-02-29 Thread Robert Clipsham
On 29/02/2012 19:41, simendsjo wrote: http://www.digitalmars.com/ctg/trace.html Has someone made some GUI/pretty printing/dump to database or other tools to make the profile data a bit simpler to digest? If you're on Windows you could try: http://h3.gd/code/xfProf/ Although I don'

GUI or more human readable -profile data?

2012-02-29 Thread simendsjo
http://www.digitalmars.com/ctg/trace.html Has someone made some GUI/pretty printing/dump to database or other tools to make the profile data a bit simpler to digest?

Re: Profile DMD

2011-12-01 Thread Nick Sabalausky
"Timon Gehr" wrote in message news:jb8iak$2ucr$1...@digitalmars.com... > On 12/01/2011 07:42 PM, Nick Sabalausky wrote: >> Is there an easy way to profile DMD similar to how DMD itself has >> the -profile switch? >> >> > > Use DMC, I guess. http://www.

Re: Profile DMD

2011-12-01 Thread Timon Gehr
On 12/01/2011 07:42 PM, Nick Sabalausky wrote: Is there an easy way to profile DMD similar to how DMD itself has the -profile switch? Use DMC, I guess. http://www.digitalmars.com/ctg/trace.html

Profile DMD

2011-12-01 Thread Nick Sabalausky
Is there an easy way to profile DMD similar to how DMD itself has the -profile switch?

Benchmarking with -profile

2011-03-06 Thread Peter Lundgren
How do you guys benchmark your D code? I tried using the -profile option, but was surprised to see wildly varying results (greater than an order of magnitude difference in Func Time) from one run to the next.

Re: -profile and threaded code

2009-03-29 Thread David Ferenczi
BCS wrote: > Hello BCS, > >> I have a program that runs an "easily" parallelizable loop. When I run >> it as a single thread it only takes about 10% longer than 2 threads >> (on a dual-core). I'm trying to track down the lossed time and am >> w

Re: -profile and threaded code

2009-03-28 Thread downs
BCS wrote: > Hello BCS, > >> I have a program that runs an "easily" parallelizable loop. When I run >> it as a single thread it only takes about 10% longer than 2 threads >> (on a dual-core). I'm trying to track down the lossed time and am >> wondering

Re: -profile and threaded code

2009-03-28 Thread BCS
Hello BCS, I have a program that runs an "easily" parallelizable loop. When I run it as a single thread it only takes about 10% longer than 2 threads (on a dual-core). I'm trying to track down the lossed time and am wondering if turning on -profile is even worth looking at. The

-profile and threaded code

2009-03-28 Thread BCS
I have a program that runs an "easily" parallelizable loop. When I run it as a single thread it only takes about 10% longer than 2 threads (on a dual-core). I'm trying to track down the lossed time and am wondering if turning on -profile is even worth looking at. The concern i