2

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

m3ntat
  • 3,635
  • 11
  • 38
  • 50

4 Answers4

2

Check out ANTS ...

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

JP Alioto
  • 44,864
  • 6
  • 88
  • 112
  • Just ran it, it runs pretty slow but very nice, exactly what I wanted, thank you. – m3ntat Jul 13 '09 at 17:28
  • Fantastic tool, well worth the license price. – JP Alioto Jul 13 '09 at 17:28
  • 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 Jul 13 '09 at 17:32
  • Also the time (%) col doesn't sum to 100%, how to read these resutls? – m3ntat Jul 13 '09 at 17:33
  • 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 Jul 14 '09 at 00:18
1

dotTrace 6 supports line by line profiling. Also, with the use of the Profiler API you can set via code which parts of the application you want to profile via PerformanceProfiler.Start and PerformanceProfiler.Stop.

Really easy to use and powerful.

xmorera
  • 1,933
  • 3
  • 20
  • 35
0

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

Mark Jerde
  • 672
  • 1
  • 7
  • 12
  • Yeah, but still not with "Thread time" which is their definition of CPU consumption (without thread sleeps and waits). I used version 4.5.1 Evaluation. – Marcel Dec 06 '11 at 15:47
-2

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

Community
  • 1
  • 1
Mike Dunlavey
  • 40,059
  • 14
  • 91
  • 135