2009-04-22 02:00:41 Top vs Statistical Profiling
Harbhajan Singh (INDIA)
Message: 73039
Hi,
Can any one tell me how to relate the
"top" and "statistical profiling" results with each other?
-Harbhajan
QuoteReplyEditDelete
2009-04-22 08:07:20 Re: Top vs Statistical Profiling
Robin Getz (UNITED STATES)
Message: 73057
Harbhajan:
top and statistical profiling could display different numbers - but if you understand what is going on, they should be close (if you add the numbers up).
top displays the task's share of the elapsed CPU time since the last screen update. (at the thread level) - including any system calls (kernel level) or library calls that the thread makes.
statistical profiling displays things at the file level, based on hte program counter.
if your application foo started three threads, it would show up on top three times, but only in statistical profiling once.
If your application made a system call, in top it would be counted as the application, in statistical profiling, it would be counted as the kernel.
If you application called the math library (to use sin for example) in top, it would be counted as the application, in statistical profiling, it would be counted as the math library.
Does that make sense?