evilsong / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

graph doesn't account for 100% cumulative CPU time #474

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I can't distribute the application I'm profiling.  Unfortunately, none of the 
simpler test cases I've written show the behaviour described below either.

What is the expected output? What do you see instead?
I hope to see the postscript graph's root nodes (those without external 
incoming edges) total up to 100% cumulative CPU time, but they don't total 
anywhere near that.

What version of the product are you using? On what operating system?
gperftools-2.0 on debian linux 64-bit

Please provide any additional information below.

I've got a postscript call graph whose root nodes don't total up to anywhere 
near 100% cumulative time.  I'm wondering if anyone has dealt with this before.

1. pprof's text output's third column, the running total of local times, does 
add up to 100% on the last row.
2. I don't need the postscript graph to total 100% cumulative, as much as 
_some_ way to see a breakdown of cumulative CPU time that totals approximately 
100%.

Our application is in Java, running in Tomcat, and it makes JNI calls to the 
LevelDB C++ library.  That library has (I think) its own threads.  The time 
they take doesn't show up in regular java profilers, such as jip 
(http://jiprof.sourceforge.net), which is why I turned to pprof.

I've attached the raw, text and pdf outputs of pprof run with arguments:
--nodefraction=0 --edgefraction=-1 /usr/lib/jvm/java-6-openjdk/bin/java

----
I came across,
http://code.google.com/p/gperftools/issues/detail?id=384
but their solution of increasing the kMaxStackDepth, even up to 8192, didn't 
solve the problem for me.

I've written toy CPU-bound programs, each of whose postscript graphs _did_ 
total 100%:
- plain C
- java with JNI
- java with JNI, where the C code runs pthreads
- all this from within tomcat
- jrockit JDK

----
software configuration:
debian linux 64-bit
oracle java 1.6
gperftools-2.0
apache tomcat 6
----

Thanks for reading.

Original issue reported on code.google.com by vibhu.mo...@gmail.com on 22 Oct 2012 at 4:53

Attachments:

GoogleCodeExporter commented 9 years ago
Have you made any further discoveries here? Have you tried the current code on 
the trunk? As I recall, a few patches for the CPU profiler have come in from 
the chromium guys.

Original comment by chapp...@gmail.com on 11 Mar 2013 at 1:06