Welcome to Omgili,
Omgili ( Oh My God I Love It ;) is a search engine for discussions. With Omgili you can find answers and solutions, debates, discussions, personal experiences, opinions and more... To learn more about Omgili click here.
This is a complete preview of the discussion as it was indexed by Omgili crawlers. Use this preview if the original discussion is unavailable.
Click here to view the original discussion.
[http://forums.yourkit.com/view...]
Click here to search for discussions with Omgili discussions search engine.
 |
YourKit Java Profiler and .NET Profiler Forums :: View topic - Finding GC roots for a package quicker
On a specific snapshot, the option 'Paths from GC roots' in the 'Class Tree', gives approx.
200 paths. Examining these paths shows that all 200 have 1 out of 2 GC roots.
Is it possible to get this information quicker?
Something like 'Show GC roots' for a given package and subpackages in the Class Tree.
|
 |
|
I'm afraid I don't fully understand the problem.
Could you please post an illustrating screenshot ?
|
 |
|
Can I send the explanation and screenshots by email?
|
 |
|
Yes. Could you please email them to support@yourkit.com
|
 |
|
I will submit this after submitting a bug (al least I think it is) in the "Show Paths to GC roots" feature.
|
 |
I'll try one more description before sketching screens etc.
This feature enhancement would enhance the process of diagnosing reference leaks.
(An extension to the "Show Paths to GC Roots" functionality)
Package "P" contains classes {A,B,C}
(Package in the way YK treats is: package + subpackages)
A is referenced by GC root "X"
B is referenced by GC roots "X" and "Y"
C is referenced by GC root "Y"
Currently this information is presented in the following manner:
A ("show paths to GC roots")
<- X
B ("show paths to GC roots")
<- X
<- Y
B ("show paths to GC roots")
<- Y
What I suggest is a different view (for package P):
User selects package "P" in Class Tree, and invokes the (new) Show GC roots" action.
X
->
A
-> B
Y
->
B
-> C
In essence this something like an inverted tree of the current "Paths from GC roots" view.
The staring point (in presentation) is not the selected object, but all GC roots that reference the selected package "P".
In the current version of YK, I select a package and explore the leaves of the "GC root tree" of this package.
(to find all unique GC roots)
In the suggested feature, I would be exploring around the root of the tree, and not around the (possibly 100s) leaves.
Much more efficient.
|
 |
If you search paths to several objects (e.g.
Objects of a package), it indeed searches shortest paths to any objects of them from any of GC roots.
It is not guarantied there will be paths to each of the objects.
I understand your suggestion.
I'm not sure this should be a separate action.
The problem is that people will be confused whether to choose which one.
I think it will be better to have one action - Find Paths - that will show two views: paths from objects to roots (as now) and from all involved roots to all objects from the object set (as you suggested).
What do you think?
|
 |
|
Anton,
What you suggest is indeed a better way of presenting such a feature!
I also have one related question:
When I select "Show paths to GC Roots" for a package, only paths to instances are calculated, but not to classes.
How about a checkbox "Include paths to classes" on the "GC roots" dialog?
|
 |
Quote: : I also have one related question:
When I select "Show paths to GC Roots" for a package, only paths to instances are calculated, but not to classes.
How about a checkbox "Include paths to classes" on the "GC roots" dialog?
Why this can be useful?
Do you hunt any class loading specific issues?
|
 |
|
Yes, especially for diagnosing class unloading problems.
|
 |
|
Did you have a change to try recently added feature called "Merged paths"?
I think it can help solving the problem that you have mentioned.
|
|
|
|