Operating System - HP-UX
1836404 Members
2560 Online
110100 Solutions
New Discussion

how to use HPJmeter analyze hprof.txt

 
Dennis.Ding
New Member

how to use HPJmeter analyze hprof.txt

I am using jdk "1.5.0_12", and I am trying to use -agentlib:hprof=heap=dump to create snapshot. There is a big problem here, HPJemeter can only analyze hprof contain only 1 snapshot, but the dumpped hprof.txt will contain all snapshot I dumpped out. So how could I resolve this issue? Thanks in advance!!!
4 REPLIES 4
JZ2
Advisor

Re: how to use HPJmeter analyze hprof.txt

Dennis,

Under normal use, hprof will write one heap dump to the output file when the program ends. So, I assume that you are using control-\ to generate the additional heap dumps. You are correct that HPjmeter will only process an hprof file when it contains a single heap dump. So my advice is to either edit your dump file to remove the additional dumps, or don't generate more than one dump in the file.

Jeff
Dennis.Ding
New Member

Re: how to use HPJmeter analyze hprof.txt

Thanks for your valuable response. HPJmeter is a good tool to analyze the heap dump file. But under more cases, we need do some compare between snapshots. So if HPJmeter can support baseline, and snapshots compare, it will be much greater.
Anyway, thanks for your answer!
JZ2
Advisor

Re: how to use HPJmeter analyze hprof.txt

Your request that HPjmeter handle heap dump files containing multiple heap dumps has been added to the suggested enhancement list for HPjmeter. You may already know this, but HPjmeter is capable of doing comparisons of heap dumps. The limitation is just that the heap dumps need to come from different input files.
Dennis.Ding
New Member

Re: how to use HPJmeter analyze hprof.txt

Yes, HPjmeter can compare between dump files, but in one dump file, the objects id is unique among serveral snapshots, this is much more easier to do compare than which in serveral files can only see object counts. I greately hope that HPJmeter will support this feature in nearly future.