A java heap/CPU profiling tool
Questions tagged [hprof]
142 questions
1
vote
1 answer
What's the meaning of `accum` field in hprof's result?
When I running java with option:
-agentlib:hprof=cpu=times
The hprof's result is like:
CPU TIME (ms) BEGIN (total = 3093024) Thu Jan 28 14:57:36 2016
rank self accum count trace method
1 35.81% 35.81% 6 328434…

secfree
- 4,357
- 2
- 28
- 36
1
vote
1 answer
Size of java heap dump files
My application server is generating .hprof files varying in different sizes from 2G to 3G. Why are heap dump files larger than the memory allocated through -Xmx.
Shouldn't they equal to max heap size? which is when out of memory error happens.

chvs2000
- 167
- 1
- 2
- 7
1
vote
1 answer
Retained size calculation including stack frame variables?
I've found a ton of questions on "retained size" and the accepted answer seems to be:
The retained size for an object is the quantity of memory this objects preserves from garbage collection.
Now, I've been working on programmatic computation of…

mabi
- 5,279
- 2
- 43
- 78
1
vote
1 answer
Android heap dump convert to J2SE : hprof-conv: command not found
Following this guide from Patrick Dubroy, i try to convert my heap dump to J2SE HPROF, but can't execute an hprof-conv. And that's strange because it located in folder.
How to fix this?

Sergey Shustikov
- 15,377
- 12
- 67
- 119
1
vote
1 answer
Interpretation of java hprof histogram
The hprof, histogram shows the number of object by class.
is this the total number of object that have ever been allocated during the life of the jvm ?
or is this the number of object where are currently on the heap ?
or is this the number of…

dmc
- 401
- 4
- 14
1
vote
1 answer
Getting Hprof dump for other processes from application code
In my application , i have an option to capture the hprof dump. I
used
android.os.Debug.dumpHprofData (String fileName)
Initially i though the hprof data generated by the method above is for
the entire device , which is not so . The hprof data…

Natarajan
- 11
- 2
1
vote
0 answers
Hadoop hprof output only has header
I am trying to profile a MapReduce job running on Azure HDInsight (HDP 2.2). All I really want is a profile of a single reduce task (though multiple would be better).
Here are the configuration settings I'm currently…

Joe K
- 18,204
- 2
- 36
- 58
1
vote
1 answer
How to use java heap profilers (HPROF)
With the basic knowledge of java 'hprof', I tried executing the below command as per oracle docs
java -agentlib:hprof Hello.class
But i get the below error instead of the profiling information
Caused by: java.lang.ClassNotFoundException:…

Aarish Ramesh
- 6,745
- 15
- 60
- 105
1
vote
0 answers
HPROF ERROR: Cannot allocate malloc memory
Running a java program using shell script but it terminates in mid of execution. Getting the below error-
HPROF ERROR: Cannot allocate malloc memory [hprof_util.c:164]
HPROF TERMINATED PROCESS
Thanks for your help.

SagarVimal
- 259
- 2
- 5
- 12
1
vote
1 answer
MAT HPROF: No space left on device
I'm running my app on my phone, while debugging with MAT. After I try to dump the HPROF file in Eclipse, I get the error:
Failed to save hprof data into temp file. No space left on device.
I've done a google search on this already...empty. I'm…

wizurd
- 3,541
- 3
- 33
- 50
1
vote
1 answer
tomcat not generating hprof file on outofmemory error
I have some memory leak issue in my web app which is deployed in tomcat. To find the root cause I enabled the HeapDumpOnOutOfMemory error by setting:
-XX:-HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/usr/local/tomcat/logs
and the memory settings…

gad
- 100
- 1
- 10
1
vote
1 answer
Why my dumped hprof file show total heap only 9.6MB while the actually heap size is 75MB
I got a hprof file from the user who encounter a OutOfMemory exception. but when open that file with Eclipse Memory Analyzer, it show that total memory only 9.6MB far from the actual heap size 75MB. Is possible that profile process only dump part of…

Highth
- 11
- 2
1
vote
2 answers
Hunting a memory leak with Eclipse and Mat, stuck converting the hprof file
This seems to be a question asked many times. I'm using Eclipse to write an Android app, in OS X. So far, no problem, except the app crashes sometimes, and I want to see whats going on so I can fix the problem. (Its probably related to bitmaps or…

Parker Sellers
- 19
- 4
1
vote
1 answer
Get total memory allocated by a Java process (without profiler)?
Is there a JVM option to print out the total memory allocated during a run without running through an instrumented profiler?
I'm certainly not an expert on how the memory allocator within Java works, but surely keeping track of total bytes allocated…

Karim
- 11
- 1
1
vote
1 answer
HPROF complains when trying to find Maven build memory leak
I have a Maven build which appears to have a leak occasionally making the Java process run out of PermGen memory (EDIT) and I have learned from VisualVM that the heap and PermGen increases notably whenever a new is built. Now I would like to find…

Thorbjørn Ravn Andersen
- 73,784
- 33
- 194
- 347