views:

320

answers:

3

I am using JetBrains dotTrace, I've profiled my app which is entirely CPU bound. But the results as you walk down the tree don't sum to the level above in the tree, I only see method calls not the body lines of the node in questions method.

Is it possible to profile the source code line by line.

i.e for one node:

  • SimulatePair() 99.04%
    --nextUniform() 30.12%
    --IDCF() 24.08%

So the method calls nextUniform + IDCF use 54% of the time in SimulatePair (or 54% total execution time I'm not sure how to read this) regardless what is happening the other 46% of SimulatePair I need some detail on a line by line basis.

Any help or alternative tools is much appreciated.

Thanks

+2  A: 

Check out ANTS ...

Line-level code timing – drill down to the specific lines of code responsible for performance inefficiencies

JP Alioto
Just ran it, it runs pretty slow but very nice, exactly what I wanted, thank you.
m3ntat
Fantastic tool, well worth the license price.
JP Alioto
Also how do interpret the results, I have at the top (Thread blocked) Time 35.781%, Time With Children 67% what exactly does this mean? this is a single thread app but the above sounds pretty bad.
m3ntat
Also the time (%) col doesn't sum to 100%, how to read these resutls?
m3ntat
I must admit, I'm not an uber expert on the specific of ANTS (I have paid for several licenses tho and like the results we get). You might want to ask these questions of the general community.
JP Alioto
A: 

Here's the method I use. It's simple, free, gives you line by line info, and suffers no such confusions.

Mike Dunlavey
A: 

For the benefit of future searchers, dotTRACE 4.0 BETA supports line-by-line profiling. It helped me find an endless loop.

Mark Jerde