|
The path to root analysis can calculate:
- a single root
Only a single garbage collector root will be found. When searching for a memory leak,
this option is often appropriate since any path to a garbage collector root will prevent
the instance from being garbage collected.
- up to a certain number of roots
A specified maximum number of roots will be found and displayed. If a single root is
not sufficient, try displaying one root more at a time until you get a useful result.
- all roots
All paths to garbage collector roots will be found and displayed. This analysis takes
much longer than the single root option and can us a lot of memory.
By default, the path to root search does not follow the weak reference types that were excluded in the
heap dump options. If you would like to show garbage
collector roots that are also reachable through these weak reference types, you can check the
Also follow [excluded reference types] option. That option is not visible if no weak reference
types were excluded.
By default the path to root search uses classes as garbage collector roots. This is not strictly correct
but valid in most situations and makes the path to root search much more usable. For example, a static field of
a class is technically not a garbage collector root, but in practice any information about why a class is not garbage
collected is not interesting. The only case where you need a different behavior is when searching for
classloader-related memory leaks. In that case, you can deselect "Use classes as roots" to use
the true garbage collector roots exclusively.
After completing the dialog with the [OK] button, the analysis will be
calculated and the result will be shown in the reference view.
With the [Cancel] button, the path to root option dialog is closed and
no analysis is performed.
|