jvm-profiling-tools / honest-profiler

A sampling JVM profiler without the safepoint sample bias
https://github.com/RichardWarburton/honest-profiler/wiki
MIT License
1.25k stars 146 forks source link

No content shown from the parser #231

Closed songdanlin closed 6 years ago

songdanlin commented 6 years ago

When I tried to parse the logs using either console or gui, no meaningful samples were found. The log.hpl has 18M data. First time user with honest-profiler, apology if it's a dumb question...

Here is the output of the console: $ ./console -log .../logs/log.hpl Printing Profile for:../logs/log.hpl 13:27:09.185 [main] DEBUG com.insightfullogic.honest_profiler.core.Conductor - Reached end of log for FileLogSource{file=/Users/dsong/projects/tmp/dummy/logs/log.hpl} due to NOTHING Number of stack traces: 2

Flat Profile (by method): (t 50.0,s 50.0) AGCT::Unknown not Java[ERR=-3] (t 50.0,s 50.0) NKNOW::140367521741528

Flat Profile (by line): (t 50.0,s 50.0) NKNOW::140367521741528 @ (bci=2,line=-100) (t 50.0,s 50.0) AGCT::Unknown not Java[ERR=-3] @ (bci=-1,line=-100)

Tree Profile: (t 100.0,s 100.0) AGCT::Unknown not Java[ERR=-3] NULL FRAME ERR

I successfully compiled source code to target (liblagent.so) on both redhat 6.9 and centOS 6.9. Started JVM with '-agentpath:/path/to/honest-profiler/liblagent.so=interval=7,logPath=/path/to/logs/log.hpl'. JVM started successfully, and log.hpl was generated, 26M data (see attached)

When using both console and gui to parse the logs, no content were shown except for the above. Looking at the log.hpl, it seems to be binary. I'm not sure if the log.hpl is not generated correctly which is causing the parser to not able to parse any information. If so, what could be possible reason for this?

log.hpl.gz

ikavalio commented 6 years ago

Hi @songdanlin, thanks for posting this. I've tried to run console application with the log attached and it works as I expect it to work and finds 114975 stack traces instead of 2:

Printing Profile for: /home/ikavalio/work/honest-profiler/log.hpl
15:37:45.415 [main] DEBUG com.insightfullogic.honest_profiler.core.Conductor - Reached end of log for FileLogSource{file=log.hpl} due to NOTHING
Number of stack traces: 114975

Flat Profile (by method):
    (t 70.0,s 70.0) AGCT::UnknownNotJava3
    (t  8.2,s  8.2) sun.misc.Unsafe::park(boolean,long)
    (t  4.9,s  4.9) java.util.zip.Inflater::inflateBytes(long,byte[],int,int)
    (t  1.4,s  1.4) AGCT::UnknownJavaErr5
...

I'm 100% sure that you're using correct agent binary, but have you compiled java part as well with mvn package -DskipTests? A couple of new log entries have been added to honest profiler recently (updated versions of old ones), so java parser has to be updated as well.

songdanlin commented 6 years ago

@ikavalio you are absolutely right! After recompiling java part I'm getting 114975 stack traces as well. Thanks you!