Finding instances with RefCount root

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
ifle
Posts: 3
Joined: Sat May 03, 2014 4:12 pm

Finding instances with RefCount root

Post by ifle » Sat Jun 07, 2014 5:04 pm

Hi,

Is there a way found all instances with a RefCount root?

Thanks.

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Re: Finding instances with RefCount root

Post by Andreas Suurkuusk » Mon Jun 09, 2014 2:38 pm

There's currently no way to get a list of all instances that are referenced by a RefCounted root. However, if you look at the <GCHandle> pseudo-type you can filter the <GCHandle> instances by "RefCounted". This will give you a list of RefCounted GC handles. To see the referenced instance you can then double-click the <GCHandle> instance and look at the references (the "(value)" field). You can browse the <GCHandle> instances by using the arrow buttons next to the "Instance" number field.

Unfortunately, to get full information about RefCounted GC handles you need to start the profiled process from the profiler. When attaching the information will be limited.
Best regards,

Andreas Suurkuusk
SciTech Software AB

ifle
Posts: 3
Joined: Sat May 03, 2014 4:12 pm

Re: Finding instances with RefCount root

Post by ifle » Mon Jun 09, 2014 3:05 pm

Andreas Suurkuusk wrote:There's currently no way to get a list of all instances that are referenced by a RefCounted root. However, if you look at the <GCHandle> pseudo-type you can filter the <GCHandle> instances by "RefCounted". This will give you a list of RefCounted GC handles. To see the referenced instance you can then double-click the <GCHandle> instance and look at the references (the "(value)" field). You can browse the <GCHandle> instances by using the arrow buttons next to the "Instance" number field.
Thanks for your explanation. A bit tricky.
Andreas Suurkuusk wrote: Unfortunately, to get full information about RefCounted GC handles you need to start the profiled process from the profiler. When attaching the information will be limited.
In my case profiled process is a native win service that use.NET components.

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Re: Finding instances with RefCount root

Post by Andreas Suurkuusk » Tue Jun 10, 2014 1:11 pm

Yes, it's a bit tricky to find the RefCounted roots in the current version. We will most likely add better support for this in the next version.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot] and 20 guests