Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the OOMDetails Dynamic Event #4606

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public sealed class DynamicEventSchema
// These are the dynamic events that are currently emitted from the runtime.
{ GCDynamicEvents.SizeAdaptationSampleSchema.DynamicEventName, Compile(GCDynamicEvents.SizeAdaptationSampleSchema) },
{ GCDynamicEvents.SizeAdaptationTuningSchema.DynamicEventName, Compile(GCDynamicEvents.SizeAdaptationTuningSchema) },
{ GCDynamicEvents.SizeAdaptationFullGCTuningSchema.DynamicEventName, Compile(GCDynamicEvents.SizeAdaptationFullGCTuningSchema) },
{ GCDynamicEvents.OOMDetailsSchema.DynamicEventName, Compile(GCDynamicEvents.OOMDetailsSchema) },
};

internal static bool allowPartialSchema;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,43 @@ internal static class GCDynamicEvents
KeyValuePair.Create("AdjMetric", typeof(bool))
}
};

public static DynamicEventSchema SizeAdaptationFullGCTuningSchema = new DynamicEventSchema
{
DynamicEventName = "SizeAdaptationFullGCTuning",
Fields = new List<KeyValuePair<string, Type>>
{
KeyValuePair.Create("version", typeof(ushort)),
KeyValuePair.Create("NewNHeaps", typeof(ushort)),
KeyValuePair.Create("CurrentGCIndex", typeof(ulong)),
KeyValuePair.Create("MedianThroughputCostPercent", typeof(float)),
KeyValuePair.Create("NumGcsSinceLastChange", typeof(uint)),
KeyValuePair.Create("DiffSamples0", typeof(uint)),
KeyValuePair.Create("GcPercent0", typeof(float)),
KeyValuePair.Create("DiffSamples1", typeof(uint)),
KeyValuePair.Create("GcPercent1", typeof(float)),
KeyValuePair.Create("DiffSamples2", typeof(uint)),
KeyValuePair.Create("GcPercent2", typeof(float)),
}
};

public static DynamicEventSchema OOMDetailsSchema = new DynamicEventSchema
{
DynamicEventName = "OOMDetails",
Fields = new List<KeyValuePair<string, Type>>
{
KeyValuePair.Create("version", typeof(ushort)),
KeyValuePair.Create("GCIndex", typeof(ulong)),
KeyValuePair.Create("Allocated", typeof(byte)),
KeyValuePair.Create("Reserved", typeof(byte)),
KeyValuePair.Create("AllocSize", typeof(ulong)),
KeyValuePair.Create("Reason", typeof(byte)),
KeyValuePair.Create("FailureGetMemory", typeof(byte)),
KeyValuePair.Create("Size", typeof(ulong)),
KeyValuePair.Create("IsLOH", typeof(byte)),
KeyValuePair.Create("MemoryLoad", typeof(uint)),
},
MaxOccurrence = 1000 // TODO: This should be the max of the number of heaps allowed.
};
}
}