Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java profiling: View binary hprof cpu sampling dumps [closed]

Is there any way to view java hprof cpu profiling dumps which have been crated using the JRE builtin hprof agent's hprof=cpu=samples,format=b parameters?

The following tools do not support viewing hprof cpu sampling data:

  • VisualVM
  • YourKit
  • JProfiler
  • Eclipse MAT
like image 724
MRalwasser Avatar asked Nov 22 '25 16:11

MRalwasser


1 Answers

Some Googling uncovers two tools that seem to analyze CPU profiling data generated by the hprof cpu=samples option (I haven't tried any of them):

  • PerfAnal: see this link and this one which seems from the project's page. However, it seems very old so hope you get lucky in using it.

  • A tool by HP called HPjmeter. The owner of this question mentions using it successfully for analyzing such profiling info. The user's manual of the tool says it supports binary format of the agent output.

Keep in mind that, in all cases, the hprof agent has always been experimental (this post discusses its inaccuracy) and that it will be even removed completely in Java 9. It's much better to use the tools you mentioned to analyze the application while running if possible.

like image 187
M A Avatar answered Nov 25 '25 06:11

M A