Search code examples
javaperformancejprofiler

JProfiler : knowing which method is calling for java objects


I'm new to JProfiller, I'm using it to know which part of my app is consuming a lot of resources.
I use the live memory and found that those object consumes a lot of memory : enter image description here

then I select heap walker as mentioned in a comment of this question, but I cannot find which method or part of my code is calling for those objects .I tested the Graph, References and Inspections but it doesn't help.
So my question is how to know which part of my code is calling for those java object ?.


Solution

  • First, double-click on the row to create a new object set. Then you can to go the "References" view and select "Cumulated incoming references" to explore the incoming references to the entire object set. Or, you can find the path to a GC root for single objects in the "Incoming references".

    Alternatively, start with the "Biggest objects" view (without selecting any object set first) to see which objects in your application retain most memory.

    A helpful screen cast is available at http://blog.ej-technologies.com/2017/03/finding-memory-leak-with-jprofiler.html