Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Memory Analyzer (MAT) » Exploring all GC roots in dump
Exploring all GC roots in dump [message #4202] Wed, 03 September 2008 17:02 Go to next message
Taras Tielkes is currently offline Taras TielkesFriend
Messages: 38
Registered: July 2009
Member
Is there an easy way in the MA tool to get a (grouped) list of all GC
roots in a snapshot? Grouped by root type (native, local, monitor, etc)?

Thanks,
-tt
Re: Exploring all GC roots in dump [message #4272 is a reply to message #4202] Wed, 03 September 2008 18:48 Go to previous messageGo to next message
Andreas Buchen is currently offline Andreas BuchenFriend
Messages: 123
Registered: July 2009
Senior Member
> Is there an easy way in the MA tool to get a (grouped) list of all GC
> roots in a snapshot?

A little bit of ugly OQL will give you a list of all GC roots.

SELECT OBJECTS $snapshot.getGCRoots() FROM OBJECTS 0x0

> Grouped by root type (native, local, monitor, etc)?

But not grouped... (an object can be GC root for multiple reasons, maybe
because it is currently on the call stack of a running thread and it is a
system class). Sorry.
Re: Exploring all GC roots in dump [message #4342 is a reply to message #4272] Wed, 03 September 2008 19:17 Go to previous message
Taras Tielkes is currently offline Taras TielkesFriend
Messages: 38
Registered: July 2009
Member
Hi Andreas,

Thanks for the query, and indeed, I forgot that an object can belong to
multiple GC root categories.

YourKit proviews a view where I can explose the roots by group, I assume
in their UI an item would be shown in multiple groups, but I'm not sure.
I've used that UI sometimes to really explore things starting from some
specific roots.

-tt

Andreas Buchen wrote:
>> Is there an easy way in the MA tool to get a (grouped) list of all GC
>> roots in a snapshot?
>
> A little bit of ugly OQL will give you a list of all GC roots.
>
> SELECT OBJECTS $snapshot.getGCRoots() FROM OBJECTS 0x0
>
>> Grouped by root type (native, local, monitor, etc)?
>
> But not grouped... (an object can be GC root for multiple reasons, maybe
> because it is currently on the call stack of a running thread and it is
> a system class). Sorry.
>
Previous Topic:understanding size for jagged byte[][]
Next Topic:OQL Parser
Goto Forum:
  


Current Time: Tue Apr 23 15:55:01 GMT 2024

Powered by FUDForum. Page generated in 0.02480 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top