Page 1 of 1

Finding instances with RefCount root

Posted: Sat Jun 07, 2014 5:04 pm
by ifle
Hi,

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

Thanks.

Re: Finding instances with RefCount root

Posted: Mon Jun 09, 2014 2:38 pm
by Andreas Suurkuusk
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.

Re: Finding instances with RefCount root

Posted: Mon Jun 09, 2014 3:05 pm
by ifle
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.

Re: Finding instances with RefCount root

Posted: Tue Jun 10, 2014 1:11 pm
by Andreas Suurkuusk
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.