Fully featured low overhead profiler for Java EE and Java SE platforms.
Ultimate profiling and monitoring solution for Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

GC Handles constantly rising in YourKit, but not in Perfmon.

Moderators: Vladimir Kondratyev, Anton Katilin

GC Handles constantly rising in YourKit, but not in Perfmon.

Postby nevdelap » Thu Sep 08, 2011 1:32 pm

Hi there,

I just starting using, and bought, YourKit today, so this might be just a newbie misunderstanding.

I've been investigating GC Handles issues when creating and unloading app domains.

With this tiny test app below the GC Handles count in YourKit rises by 34 handles for each CreateDomain/Unload. (The different app domain name is important.)

So this was alarming me.

But in PerfMon it goes up and down between about 4 and about 70, apparently not having much to do with the 5 second cycle of the CreateDomain/Unloads, and seemly fine.

So I'm wondering what GC Handles is indicating? (Since it seems to just be accumulating.)

Thanks!

Code: Select all
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            for (int i = 0; i < 1000; i++)
            {
                var appDomain = AppDomain.CreateDomain(string.Format("Whatever{0}", i.ToString()));
                AppDomain.Unload(appDomain);
                Thread.Sleep(5000);
            }
        }
    }
}
nevdelap
 
Posts: 2
Joined: Thu Sep 08, 2011 1:21 pm

Re: GC Handles constantly rising in YourKit, but not in Perf

Postby Anton Katilin » Thu Sep 08, 2011 5:59 pm

Hello,

We acknowledge the problem: the shown number of GC handles constantly grows with your example application.

We're investigating the issue.

Technically, the following CLR profiler API callbacks are used to count the number:

ICorProfilerCallback2::HandleCreated
http://msdn.microsoft.com/en-us/library/ms231189.aspx

and

ICorProfilerCallback2::HandleDestroyed
http://msdn.microsoft.com/en-us/library/ms232126.aspx

Best regards,
Anton
Anton Katilin
 
Posts: 5575
Joined: Wed Aug 11, 2004 8:37 am


Return to .NET Profiler

Who is online

Users browsing this forum: No registered users and 4 guests

cron