Jprofile viewing hprof files [go]

Source: Internet
Author: User

Open the Hprof file with Jprofile to see the memory leaks, there are a few common features to illustrate:
Tool Download: Download jprofile7.0.1 64-bit to the official website. Re-apply for a registration number, the registration number of the application seems to be an email can only be used once.
1. Open the Hprof file: Enter the classes view, based on (instance count and size) basic can determine which class of the object has problems. For example (there are 2,731,062 instances of the Java.util.linkedlist$entry Class).
2, according to common sense, should be Java.util.LinkedList class has an object size should be very large.
3. View Java.util.LinkedList, right-->use Selected Instance
4. Select Outgoing reference view (you can view other object handles owned by the object, that is, object properties). Look at the retained size column (or the Size property) (sometimes retained size doesn't work), and the size will determine which object is out of memory.
5, find the corresponding object, right-click->use Selected Instance
6. Select Incoming refrences view (this view shows which objects have a handle to this object), in this view there is a show Paths to GC root button, click, Basic can determine which code we have a problem.

Jprofile viewing hprof files [go]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.