private GCDetails GetCurrentGC(GCInfo info)
        {
            if (info.GCInProgress != null)
            {
                return(info.GCInProgress);
            }

            return(info.CurrentBGC);
        }
        protected override void OnEventSourceCreated(EventSource eventSource)
        {
            _gcInfo = new GCInfo(Process.GetCurrentProcess().Id);

            _eventSource = eventSource;

            // look for .NET Garbage Collection events only
            if (eventSource.Name.Equals("Microsoft-Windows-DotNETRuntime"))
            {
                EnableEvents(eventSource, EventLevel.Informational, (EventKeywords)(GC_KEYWORD));
            }
        }
 private void ClearCollections(GCInfo info)
 {
     info.CurrentBGC      = null;
     info.GCInProgress    = null;
     info.SuspensionStart = null;
 }