www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - tool to 'prettify' dmd profiler logs

reply Lutger <lutger.blijdestijn gmail.com> writes:
I have this crappy yet functioning tool to make html files out of dmd's 
profiler output. Since somebody in another thread remarked that this 
output was unreadable, I thought it might be useful to share.

It works with the ddoc system, so it's possible to customize the end 
result.

source (Tango):
http://lutger.ifastnet.com/ptrace/ptrace.zip
source + windows binary:
http://lutger.ifastnet.com/ptrace/ptrace_win.zip
Aug 08 2007
next sibling parent reply Brad Roberts <braddr puremagic.com> writes:
On Thu, 9 Aug 2007, Lutger wrote:

 I have this crappy yet functioning tool to make html files out of dmd's
 profiler output. Since somebody in another thread remarked that this output
 was unreadable, I thought it might be useful to share.
 
 It works with the ddoc system, so it's possible to customize the end result.
 
 source (Tango):
 http://lutger.ifastnet.com/ptrace/ptrace.zip
 source + windows binary:
 http://lutger.ifastnet.com/ptrace/ptrace_win.zip

(channeling Walter) A random tarball doesn't do a good job of describing itself. How about adding an index.html there to give the app a better, more complete, home? Even better would be using dsource (or google's code thingy) to house the project where you can actually put it under source control, etc.
Aug 08 2007
next sibling parent reply Lutger <lutger.blijdestijn gmail.com> writes:
Brad Roberts wrote:
 
 (channeling Walter)
 
 A random tarball doesn't do a good job of describing itself.  How about 
 adding an index.html there to give the app a better, more complete, home?  
 Even better would be using dsource (or google's code thingy) to house the 
 project where you can actually put it under source control, etc.

Ok, will do. I don't think this is as much of a project to put it in dsource, but some webpage would be better indeed.
Aug 08 2007
parent Walter Bright <newshound1 digitalmars.com> writes:
Brad Roberts wrote:
 Lutger wrote:
 Ok, will do. I don't think this is as much of a project to put it in 
 dsource, but some webpage would be better indeed.

Simple projects have a habit growing beyond their original scope. :)

I agree. I wrote obj2asm originally as a quick hack. It has grown into quite a full featured program (but internally it's still an awful mess).
Aug 10 2007
prev sibling next sibling parent Brad Roberts <braddr puremagic.com> writes:
Lutger wrote:
 Brad Roberts wrote:
 (channeling Walter)

 A random tarball doesn't do a good job of describing itself.  How 
 about adding an index.html there to give the app a better, more 
 complete, home?  Even better would be using dsource (or google's code 
 thingy) to house the project where you can actually put it under 
 source control, etc.

Ok, will do. I don't think this is as much of a project to put it in dsource, but some webpage would be better indeed.

Simple projects have a habit growing beyond their original scope. :)
Aug 08 2007
prev sibling parent reply BCS <ao pathlink.com> writes:
Reply to Brad,

 On Thu, 9 Aug 2007, Lutger wrote:
 
 I have this crappy yet functioning tool to make html files out of
 dmd's profiler output. Since somebody in another thread remarked that
 this output was unreadable, I thought it might be useful to share.
 
 It works with the ddoc system, so it's possible to customize the end
 result.
 
 source (Tango):
 http://lutger.ifastnet.com/ptrace/ptrace.zip
 source + windows binary:
 http://lutger.ifastnet.com/ptrace/ptrace_win.zip

A random tarball doesn't do a good job of describing itself. How about adding an index.html there to give the app a better, more complete, home? Even better would be using dsource (or google's code thingy) to house the project where you can actually put it under source control, etc.

their's always scrapple. http://www.dsource.org/projects/scrapple
Aug 08 2007
parent reply Lutger <lutger.blijdestijn gmail.com> writes:
BCS wrote:
 their's always scrapple.
 
 http://www.dsource.org/projects/scrapple
 
 

Maybe that's a good idea. About scrapple, will you consider lodepng for inclusion? I think it's scope is too small for a project of it's own, but moving it to dsource would be nice. Thanks.
Aug 09 2007
parent reply BCS <ao pathlink.com> writes:
Reply to Lutger,

 BCS wrote:
 
 their's always scrapple.
 
 http://www.dsource.org/projects/scrapple
 

for inclusion? I think it's scope is too small for a project of it's own, but moving it to dsource would be nice. Thanks.

shure, I've already got tinyjpg.
Aug 09 2007
parent BCS <ao pathlink.com> writes:
Reply to BCS,

 Reply to Lutger,
 
 BCS wrote:
 
 their's always scrapple.
 
 http://www.dsource.org/projects/scrapple
 

for inclusion? I think it's scope is too small for a project of it's own, but moving it to dsource would be nice. Thanks.


If you need access just send me a dsource username
Aug 11 2007
prev sibling next sibling parent reply Extrawurst <spam extrawurst.org> writes:
i like it. i never really used the D profiler cause i didn't understand 
the output.
just two points:
1) ptrace is extremly slow isn't it ? i hope its not just my machine, 
but for a 1mb trace.log it took minutes to parse.
2) could you also include a legend or a table header in the call-graph 
section to explain the numbers behind every function ?


Lutger schrieb:
 I have this crappy yet functioning tool to make html files out of 
 dmd's profiler output. Since somebody in another thread remarked that 
 this output was unreadable, I thought it might be useful to share.

 It works with the ddoc system, so it's possible to customize the end 
 result.

 source (Tango):
 http://lutger.ifastnet.com/ptrace/ptrace.zip
 source + windows binary:
 http://lutger.ifastnet.com/ptrace/ptrace_win.zip

Aug 09 2007
parent Lutger <lutger.blijdestijn gmail.com> writes:
Extrawurst wrote:
 just two points:
 1) ptrace is extremly slow isn't it ? i hope its not just my machine, 
 but for a 1mb trace.log it took minutes to parse.

It's slow, but that's too much. The cause is bad use of regexes, I'll fix it.
 2) could you also include a legend or a table header in the call-graph 
 section to explain the numbers behind every function ?

Sure, I will make some improvements.
Aug 09 2007
prev sibling parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Lutger wrote:
 I have this crappy yet functioning tool to make html files out of dmd's 
 profiler output. Since somebody in another thread remarked that this 
 output was unreadable, I thought it might be useful to share.
 
 It works with the ddoc system, so it's possible to customize the end 
 result.
 
 source (Tango):
 http://lutger.ifastnet.com/ptrace/ptrace.zip
 source + windows binary:
 http://lutger.ifastnet.com/ptrace/ptrace_win.zip

I tried it but here's what I got:
ptrace -t=profile.d

tango.core.Exception.IllegalArgumentException: Integer.toInt :: numeric overflow That was what finally came out after a long time waiting. I suspect the reason might be these weird lines I'm getting in my profile: ------------------ _D8rbftools3api475__T18Kernel_Eva䳡椀渀䘀 甀渀吀匀耀꤀㔀㠀耀ꠀ 䬀䈀愀猀椀挀䘀吀漀爀匀㌀ 㘀耀ꄀ㈀㄀爀㈀氀漀最爀开攀耀쐀elemVh2Z€З€Ṫ63€× 1KDDeriv€ุ40€Ø5€ظdd€Ŗöꖀ耀ᰀ耄ﴀᇿ됀8€Ü3 Āﴀ烿y51傶耀଀ 漀洀椀愀氀Ѐ 䀀ŠVE€©9€ŖOr€Ú1Z€ ------------------ There are quite a few lines like that in the trace.log dmd is spitting out. --bb
Aug 09 2007
next sibling parent Walter Bright <newshound1 digitalmars.com> writes:
Bill Baxter wrote:
 I suspect the reason might be these weird lines I'm getting in my profile:
 
 ------------------
         _D8rbftools3api475__T18Kernel_Eva䳡椀渀䘀
甀渀吀匀耀꤀㔀㠀耀ꠀ 䬀 
 䈀愀猀椀挀䘀吀漀爀匀㌀ 㘀耀ꄀ㈀㄀爀㈀氀漀最爀开攀耀 
 쐀elemVh2Z€З€Ṫ63€×
1KDDeriv€ุ40€Ø5€ظdd€Ŗöꖀ耀ᰀ耄ﴀᇿ됀8€Ü3Āﴀ
y51傶耀଀渀 
 漀洀椀愀氀Ѐ 䀀ŠVE€©9€ŖOr€Ú1Z€
 ------------------
 
 There are quite a few lines like that in the trace.log dmd is spitting out.

The weird names are the result of the compiler trying to reduce the length of them so they'll fit in the obj file format.
Aug 10 2007
prev sibling parent Lutger <lutger.blijdestijn gmail.com> writes:
Bill Baxter wrote:
  > I tried it but here's what I got:
 
  >ptrace -t=profile.d
 Reading from trace.log and writing to profile.d
 tango.core.Exception.IllegalArgumentException: Integer.toInt :: numeric 
 overflow
 
 
 That was what finally came out after a long time waiting.
 
 I suspect the reason might be these weird lines I'm getting in my profile:
 
 ------------------
         _D8rbftools3api475__T18Kernel_Eva䳡椀渀䘀
甀渀吀匀耀꤀㔀㠀耀ꠀ 䬀 
 䈀愀猀椀挀䘀吀漀爀匀㌀ 㘀耀ꄀ㈀㄀爀㈀氀漀最爀开攀耀 
 쐀elemVh2Z€З€Ṫ63€×
1KDDeriv€ุ40€Ø5€ظdd€Ŗöꖀ耀ᰀ耄ﴀᇿ됀8€Ü3Āﴀ
y51傶耀଀渀 
 漀洀椀愀氀Ѐ 䀀ŠVE€©9€ŖOr€Ú1Z€
 ------------------
 
 There are quite a few lines like that in the trace.log dmd is spitting out.
 
 --bb

Thanks for mentioning. I have updated this random tarball with some fixes and other improvements, performance should also be ok now :) http://lutger.ifastnet.com/ptrace/ptrace_win.zip If you come across such a problem again, if it's possible for you to send me your trace.log that would be really helpful: lutger dot blijdestijn at gmail dot com When I get it in dsource, I'll make it a bit nicer.
Aug 11 2007