[Profiler] Count value of 0xffffffff in GCSuspendEEBegin_V1 event #116667
-
While monitoring .NET Runtime ETW events, I've noticed a peculiar value in the Steps to Reproduce
Sample Codeprotected override void OnEventWritten(EventWrittenEventArgs eventData)
{
if (eventData.EventId == 9) // GCSuspendEEBegin_V1
{
var reason = (uint)eventData.Payload[0];
var count = (uint)eventData.Payload[1];
Console.WriteLine($"GCSuspendEEBegin: Reason={reason}, Count={count:X}");
}
} Questions
Environment Information
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi, @mdh1418 ,Do you know why? |
Beta Was this translation helpful? Give feedback.
-
For reference, the manifest entry for GCSuspendEEBegin_V1 is here: runtime/src/coreclr/vm/ClrEtwAll.man Lines 1092 to 1104 in f76e203 Typically, the events are fired through a helper like runtime/src/coreclr/vm/threadsuspend.cpp Line 5540 in 4caf064
In short, the runtime can be suspended for a variety of reasons besides GC, as alluded to in the threadsuspend.h header file. The name was never updated to not be prefixed with |
Beta Was this translation helpful? Give feedback.
Ah, you're right. I was mistaken that it represented the gen of GC. From
runtime/src/coreclr/gc/gcpriv.h
Line 635 in 0d628da
I still think the "jumps" to
0xFFFFFFFF
means that the runtime suspension was not due to GC, and that it is this else case before the FireETWGCSuspendEEBegin_V1