Reference groups

Questions about YourKit Java Profiler
Post Reply
tbehrends
Posts: 16
Joined: Fri Sep 03, 2004 2:38 pm

Reference groups

Post by tbehrends »

Hello,

I am mainly profiling the memory consumption of my application. Whenever I see there is a load of object of a specific class (e.g. String) I'd like to analyse wherefrom this objects a referenced (especially if the number of objects of this class increased dramatically since the last profile).

It's only possible to analyze single objects with the "Find Path" function and then only to see the first n objects (which are never the interesting ones ;-). More interesting would be to see which _percentage_ of the objects are referenced by which other class (not objects). Than I could see x% are referenced by class A, y% by class B and so on.

Any plans to implement something like this?

Bye,
tom
Vladimir Kondratyev
Posts: 1624
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

We think that there is a different approach which prevents from solving the described task. If we properly understanded you, first you find class with biggest number of instances and after that you are trying to classify where these instances are referenced from.

There is another approach that is already provided by "Class Tree" view. You start with the whole number of objects and drilling down package tree, find your subsystem (usually subsystem corresponds to package) that retains the most amount of memory.
tbehrends
Posts: 16
Joined: Fri Sep 03, 2004 2:38 pm

Post by tbehrends »

Hi.

Finding the class with the biggest amount of memory (using the package explorer) is only the first step.

When I see that the number of objects has increased since my last memory-snapshot I would like to know where the objects are referenced from and why (if there is a memory leak) they are not deleted by the garbage collector.

Using the path-function is one way to look for references but it only works with a small number of objects and gives no overview.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

To find the new objects you can use snapshot comparison feature. Then select new objects and find paths to see why the new objects retain.
tbehrends
Posts: 16
Joined: Fri Sep 03, 2004 2:38 pm

Post by tbehrends »

Hi!

Thats the problem: I have to checks each single object and I can only check the first 100 or 1000 but I my case I have 12000 remaining. I would prefer more "overview".

Greetings,
Thomas
Post Reply