Garbage Collection ETW Events
These events collect information pertaining to garbage collection. They help in diagnostics and debugging, including determining how many times garbage collection was performed, how much memory was freed during garbage collection, and so on.
This category consists of the following events:
GCStart_V1 Event
GCEnd_V1 Event
GCHeapStats_V1 Event
GCCreateSegment_V1 Event
GCFreeSegment_V1 Event
GCRestartEEBegin_V1 Event
GCRestartEEEnd_V1 Event
GCSuspendEE_V1 Event
GCSuspendEEEnd_V1 Event
GCAllocationTick_V1 Event
GCFinalizersBegin_V1 Event
GCFinalizersEnd_V1 Event
GCCreateConcurrentThread_V1 Event
GCTerminateConcurrentThread_V1 Event
GCStart_V1 Event
The following table shows the keyword and level. (For more information, see CLR ETW Keywords and Levels.)
Keyword for raising the event |
Level |
---|---|
GCKeyword (0x1) |
Informational (4) |
The following table shows the event information.
Event |
Event ID |
Raised when |
---|---|---|
GCStart_V1 |
1 |
A garbage collection has started. |
The following table shows the event data.
Field name |
Data type |
Description |
---|---|---|
Count |
win:UInt32 |
The nth garbage collection. |
Depth |
win:UInt32 |
The generation that is being collected. |
Reason |
win:UInt32 |
Why the garbage collection was triggered: 0x0 - Small object heap allocation. 0x1 - Induced. 0x2 - Low memory. 0x3 - Empty. 0x4 - Large object heap allocation. 0x5 - Out of space (for small object heap). 0x6 - Out of space (for large object heap). |
Type |
win:UInt32 |
0x0 - Blocking garbage collection occurred outside background garbage collection. 0x1 - Background garbage collection. 0x2 - Blocking garbage collection occurred during background garbage collection. |
ClrInstanceID |
win:UInt16 |
Unique ID for the instance of CLR or CoreCLR. |
Back to top
GCEnd_V1 Event
The following table shows the keyword and level.
Keyword for raising the event |
Level |
---|---|
GCKeyword (0x1) |
Informational (4) |
The following table shows the event information.
Event |
Event ID |
Raised when |
---|---|---|
GCEnd_V1 |
2 |
The garbage collection has ended. |
The following table shows the event data.
Field name |
Data type |
Description |
---|---|---|
Count |
win:UInt32 |
The nth garbage collection. |
Depth |
win:UInt32 |
The generation that was collected. |
ClrInstanceID |
win:UInt16 |
Unique ID for the instance of CLR or CoreCLR. |
Back to top
GCHeapStats_V1 Event
The following table shows the keyword and level.
Keyword for raising the event |
Level |
---|---|
GCKeyword (0x1) |
Informational (4) |
The following table shows the event information.
Event |
Event ID |
Description |
---|---|---|
GCHeapStats_V1 |
4 |
Shows the heap statistics at the end of each garbage collection. |
The following table shows the event data.
Field name |
Data type |
Description |
---|---|---|
GenerationSize0 |
win:UInt64 |
The size, in bytes, of generation 0 memory. |
TotalPromotedSize0 |
win:UInt64 |
The number of bytes that are promoted from generation 0 to generation 1. |
GenerationSize1 |
win:UInt64 |
The size, in bytes, of generation 1 memory. |
TotalPromotedSize1 |
win:UInt64 |
The number of bytes that are promoted from generation 1 to generation 2. |
GenerationSize2 |
win:UInt64 |
The size, in bytes, of generation 2 memory. |
TotalPromotedSize2 |
win:UInt64 |
The number of bytes that survived in generation 2 after the last collection. |
GenerationSize3 |
win:UInt64 |
The size, in bytes, of the large object heap. |
TotalPromotedSize3 |
win:UInt64 |
The number of bytes that survived in the large object heap after the last collection. |
FinalizationPromotedSize |
win:UInt64 |
The total size, in bytes, of the objects that are ready for finalization. |
FinalizationPromotedCount |
win:UInt64 |
The number of objects that are ready for finalization. |
PinnedObjectCount |
win:UInt32 |
The number of pinned (unmovable) objects. |
SinkBlockCount |
win:UInt32 |
The number of synchronization blocks in use. |
GCHandleCount |
win:UInt32 |
The number of garbage collection handles in use. |
ClrInstanceID |
win:UInt16 |
Unique ID for the instance of CLR or CoreCLR. |
Back to top
GCCreateSegment_V1 Event
The following table shows the keyword and level.
Keyword for raising the event |
Level |
---|---|
GCKeyword (0x1) |
Informational (4) |
The following table shows the event information.
Event |
Event ID |
Raised when |
---|---|---|
GCCreateSegment_V1 |
5 |
A new garbage collection segment has been created. In addition, when tracing is enabled on a process that is already running, this event is raised for each existing segment. |
The following table shows the event data.
Field name |
Data type |
Description |
---|---|---|
Address |
win:UInt64 |
The address of the segment. |
Size |
win:UInt64 |
The size of the segment. |
Type |
win:UInt32 |
0x0 - Small object heap. 0x1 - Large object heap. 0x2 - Read-only heap. |
ClrInstanceID |
win:UInt16 |
Unique ID for the instance of CLR or CoreCLR. |
Back to top
GCFreeSegment_V1 Event
The following table shows the keyword and level.
Keyword for raising the event |
Level |
---|---|
GCKeyword (0x1) |
Informational (4) |
The following table shows the event information.
Event |
Event ID |
Raised when |
---|---|---|
GCFreeSegment_V1 |
6 |
A garbage collection segment has been released. |
The following table shows the event data.
Field name |
Data type |
Description |
---|---|---|
Address |
win:UInt64 |
The address of the segment. |
ClrInstanceID |
win:UInt16 |
Unique ID for the instance of CLR or CoreCLR. |
Back to top
GCRestartEEBegin_V1 Event
The following table shows the keyword and level.
Keyword for raising the event |
Level |
---|---|
GCKeyword (0x1) |
Informational (4) |
The following table shows the event information.
Event |
Event ID |
Raised when |
---|---|---|
GCRestartEEBegin_V1 |
7 |
Resumption from common language runtime suspension has begun. |
No event data.
Back to top
GCRestartEEEnd_V1 Event
The following table shows the keyword and level.
Keyword for raising the event |
Level |
---|---|
GCKeyword (0x1) |
Informational (4) |
The following table shows the event information.
Event |
Event Id |
Raised when |
---|---|---|
GCRestartEEEnd_V1 |
3 |
Resumption from common language runtime suspension has ended. |
No event data.
Back to top
GCSuspendEE_V1 Event
The following table shows the keyword and level.
Keyword for raising the event |
Level |
---|---|
GCKeyword (0x1) |
Informational (4) |
The following table shows the event information.
Event |
Event ID |
Raised when |
---|---|---|
GCSuspendEE_V1 |
9 |
Start of suspension of the execution engine for garbage collection. |
The following table shows the event data.
Field name |
Data type |
Description |
---|---|---|
Reason |
win:UInt16 |
0x0 - Other. 0x1 - Garbage collection. 0x2 - Application domain shutdown. 0x3 - Code pitching. 0x4 - Shutdown. 0x5 - Debugger. 0x6 - Preparation for garbage collection. |
Count |
win:UInt32 |
The number of threads that are suspended. |
ClrInstanceID |
win:UInt16 |
Unique ID for the instance of CLR or CoreCLR. |
Back to top
GCSuspendEEEnd_V1 Event
The following table shows the keyword and level:
Keyword for raising the event |
Level |
---|---|
GCKeyword (0x1) |
Informational (4) |
The following table shows the event information:
Event |
Event ID |
Raised when |
---|---|---|
GCSuspendEEEnd_V1 |
8 |
End of suspension of the execution engine for garbage collection. |
No event data.
Back to top
GCAllocationTick_V1 Event
The following table shows the keyword and level.
Keyword for raising the event |
Level |
---|---|
GCKeyword (0x1) |
Informational (4) |
The following table shows the event information.
Event |
Event ID |
Raised when |
---|---|---|
GCAllocationTick_V1 |
10 |
Each time approximately 100 KB is allocated. |
The following table shows the event data.
Field name |
Data type |
Description |
---|---|---|
AllocationSize |
win:UInt32 |
The allocation size. |
Kind |
win:UInt32 |
0x0 - Small object allocation (allocation is in small object heap). 0x1 - Large object allocation (allocation is in large object heap). |
ClrInstanceID |
win:UInt16 |
Unique ID for the instance of CLR or CoreCLR. |
Back to top
GCFinalizersBegin_V1 Event
The following table shows the keyword and level.
Keyword for raising the event |
Level |
---|---|
GCKeyword (0x1) |
Informational (4) |
The following table shows the event information.
Event |
Event ID |
Raised when |
---|---|---|
GCFinalizersBegin_V1 |
14 |
The start of running finalizers. |
No event data.
Back to top
GCFinalizersEnd_V1 Event
The following table shows the keyword and level.
Keyword for raising the event |
Level |
---|---|
GCKeyword (0x1) |
Informational (4) |
The following table shows the event information.
Event |
Event ID |
Raised when |
---|---|---|
GCFinalizersEnd_V1 |
13 |
The end of running finalizers. |
The following table shows the event data.
Field name |
Data type |
Description |
---|---|---|
Count |
win:UInt32 |
The number of finalizers that were run. |
ClrInstanceID |
win:UInt16 |
Unique ID for the instance of CLR or CoreCLR. |
Back to top
GCCreateConcurrentThread_V1 Event
The following table shows the keyword and level.
Keyword for raising the event |
Level |
---|---|
GCKeyword (0x1) |
Informational (4) |
ThreadingKeyword (0x10000) |
Informational (4) |
The following table shows the event information.
Event |
Event ID |
Raised when |
---|---|---|
GCCreateConcurrentThread_V1 |
11 |
Concurrent garbage collection thread was created. |
No event data.
Back to top
GCTerminateConcurrentThread_V1 Event
The following table shows the keyword and level.
Keyword for raising the event |
Level |
---|---|
GCKeyword (0x1) |
Informational (4) |
ThreadingKeyword (0x10000) |
Informational (4) |
The following table shows the event information.
Event |
Event ID |
Raised when |
---|---|---|
GCTerminateConcurrentThread_V1 |
12 |
Concurrent garbage collection thread was terminated. |
No event data.
Back to top