private void OnSampleObjectAllocation(GCSampledObjectAllocationTraceData data) { if (FilterOutEvent(data)) { return; } GetProcessAllocations(data.ProcessID) .AddAllocation( (ulong)data.TotalSizeForTypeSample, (ulong)data.ObjectCountForTypeSample, GetProcessTypeName(data.ProcessID, data.TypeID) ); }
private void OnSampleObjectAllocation(GCSampledObjectAllocationTraceData data) { if (FilterOutEvent(data)) { return; } var typeName = GetProcessTypeName(data.ProcessID, data.TypeID); if (data.TotalSizeForTypeSample >= 85000) { var message = $"{data.ProcessID}.{data.ThreadID} - {data.TimeStampRelativeMSec,12} | Alloc {GetProcessTypeName(data.ProcessID, data.TypeID)} ({data.TotalSizeForTypeSample})"; Console.WriteLine(message); } GetProcessAllocations(data.ProcessID) .AddAllocation( data.ThreadID, (ulong)data.TotalSizeForTypeSample, (ulong)data.ObjectCountForTypeSample, typeName ); }