Jprofile View hprof file

Open the file with jprofile hprof view memory leak case, we had to explain several common features:

1 Download

1.1 official website

Click fool download

2 Installation

1, hprof open file: enter classes view, according to (instance count and Size) class of objects which is almost certain problems. For example (java.util.LinkedList $ Entry class has instances 2,731,062).
2, according to common sense, there should java.util.LinkedList class object Size should be great.
3, view java.util.LinkedList, right -> use the Selected Instance
4, select Outgoing reference view (you can see other objects have object handles, which is the object properties). Look Retained size column (or size attribute) (sometimes Retained size does not speak), look at the size of the object will be able to determine which memory overflow.
5, find the corresponding object, right -> use the Selected Instance
. 6, select Incoming refrences view (the view shows what objects have a handle to this object), there is show Paths To GC Root button in this view, click, basically we have to determine what the code open question.

Published 338 original articles · won praise 231 · views 220 000 +

Guess you like

Origin blog.csdn.net/qq_33589510/article/details/104351579