www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Do we have any kind of build profiler?

reply Hipreme <msnmancini hotmail.com> writes:
We all know we have `ldc2 --ftime-trace` which generates a "build 
profiler" for we to drop on chrome's performance tab. But there 
are some problem with it:

1: We don't really know how much time each CTFE takes
2: Most of its time is usually as abstract as "object generating"
3: Only ldc has that feature
4: In my project, I need to manually adjust the output as it has 
some problems with windows backslash


There was many projects which CyberShadow done, but they are all 
deprecated by today. I think we should really be able to do calls 
for getting the current sys time at compilation time. It would be 
much better than doing these really complex tools that go 
deprecated really fast.

I have tried doing template instantiation + __TIME__, but it 
seems that __TIME__ only generates a single value.
Mar 19 2022
next sibling parent reply Johan <j j.nl> writes:
On Saturday, 19 March 2022 at 12:50:29 UTC, Hipreme wrote:
 We all know we have `ldc2 --ftime-trace` which generates a 
 "build profiler" for we to drop on chrome's performance tab. 
 But there are some problem with it:

 1: We don't really know how much time each CTFE takes
 2: Most of its time is usually as abstract as "object 
 generating"
 3: Only ldc has that feature
 4: In my project, I need to manually adjust the output as it 
 has some problems with windows backslash
It's nice to hear you are using the feature! 1, 2, and 4 are probably easily improved when you tell us about it in detail. I'm waiting for user feedback, so please submit issues here: https://github.com/ldc-developers/ldc/issues Btw, I highly recommend Tracy UI (https://github.com/wolfpld/tracy) to look at the profiles. It is much better and faster than chrome. Thanks, Johan
Mar 19 2022
parent reply Hipreme <msnmancini hotmail.com> writes:
On Saturday, 19 March 2022 at 13:28:06 UTC, Johan wrote:
 On Saturday, 19 March 2022 at 12:50:29 UTC, Hipreme wrote:
 [...]
It's nice to hear you are using the feature! 1, 2, and 4 are probably easily improved when you tell us about it in detail. I'm waiting for user feedback, so please submit issues here: https://github.com/ldc-developers/ldc/issues Btw, I highly recommend Tracy UI (https://github.com/wolfpld/tracy) to look at the profiles. It is much better and faster than chrome. Thanks, Johan
I have tried after correcting my time trace output. It doesn't seem that it is a valid file for tracy
Mar 19 2022
parent reply Paul Backus <snarwin gmail.com> writes:
On Saturday, 19 March 2022 at 14:46:26 UTC, Hipreme wrote:
 I have tried after correcting my  time trace output. It doesn't 
 seem that it is a valid file for tracy
You need to use tracy's `import-chrome` command to convert the profile from Chrome's format to tracy's format. This post by Dennis has more detailed instructions: https://forum.dlang.org/post/eevoyuwhbuycyzgxsqsc forum.dlang.org
Mar 19 2022
parent Hipreme <msnmancini hotmail.com> writes:
On Saturday, 19 March 2022 at 14:58:48 UTC, Paul Backus wrote:
 On Saturday, 19 March 2022 at 14:46:26 UTC, Hipreme wrote:
 I have tried after correcting my  time trace output. It 
 doesn't seem that it is a valid file for tracy
You need to use tracy's `import-chrome` command to convert the profile from Chrome's format to tracy's format. This post by Dennis has more detailed instructions: https://forum.dlang.org/post/eevoyuwhbuycyzgxsqsc forum.dlang.org
Humm thanks, it solved the problem over making tracy import correctly the file. Although it is a bit better than looking into chrome, I can`t still find the bottleneck of that profiling. As it shows, I don`t have control over 70% of the build time which is still a lot of time.
Mar 19 2022
prev sibling parent reply max haughton <maxhaton gmail.com> writes:
On Saturday, 19 March 2022 at 12:50:29 UTC, Hipreme wrote:
 We all know we have `ldc2 --ftime-trace` which generates a 
 "build profiler" for we to drop on chrome's performance tab. 
 But there are some problem with it:

 [...]
How long is the build and how many lines is it.
Mar 19 2022
parent Hipreme <msnmancini hotmail.com> writes:
On Saturday, 19 March 2022 at 16:26:08 UTC, max haughton wrote:
 On Saturday, 19 March 2022 at 12:50:29 UTC, Hipreme wrote:
 We all know we have `ldc2 --ftime-trace` which generates a 
 "build profiler" for we to drop on chrome's performance tab. 
 But there are some problem with it:

 [...]
How long is the build and how many lines is it.
Currently 4 seconds the main module. On the ftime-trace log, it has 2300 lines
Mar 19 2022