Interpreting method calls outside the profiling session

Using dotTrace 3.1.357.3 for performance profiling using tracing, I frequently observe the cost of a function call consuming an unexpectedly large amount of time.  Every time this happens, function execution was partially outside the profiling session.  I can reproduce this in the first snapshot (after staring the application from the profiler) as well as when profiling is suspended and restarted.  Is there a rationale for this behavior?  Perhaps the thread gets suspended (due to the cost of the injected profiling code), and the timestamps no longer reflect reality.  Would using sampling instead of tracing ameliorate this behavior?  Is there a way to filter stale/inaccurate calls from the result set?

1 comment

Hi Ed,

There are many reasons to this behaviour:
1. JIT compiles application in different way - special stubs for each function at prolog and epilog;
2. dotTrace 3.1 doesn't not compensate internal profiler time at prolog and epilog (dotTrace 4.0 has this feature as option);
3. dotTrace 3.1 doesn't not compensate GC time (I plan to implement this feature next month).

WBR, MIkhail Pilin


Please sign in to leave a comment.