diff options
author | Sean Gillespie <sean@pulumi.com> | 2018-01-30 14:27:16 -0800 |
---|---|---|
committer | David Mason <davmason@microsoft.com> | 2018-01-30 14:27:16 -0800 |
commit | 338b9fa5c5216bdaa4f6c66fc36aea7bb19276b7 (patch) | |
tree | 7e0db335c25c481229aeb3f6042c954c798ead25 /src/vm/eventtrace.cpp | |
parent | 94c6a4ea75d187a0076ec117e2bc84791465d993 (diff) | |
download | coreclr-338b9fa5c5216bdaa4f6c66fc36aea7bb19276b7.tar.gz coreclr-338b9fa5c5216bdaa4f6c66fc36aea7bb19276b7.tar.bz2 coreclr-338b9fa5c5216bdaa4f6c66fc36aea7bb19276b7.zip |
[Local GC] FEATURE_EVENT_TRACE 4/n: Event ports for all GC-keyword events (#16031)
* [Local GC] Event ports: GCStart and GCGenerationRange
* [Local GC] Event ports: GCEnd
* [Local GC] Event ports: GCHeapStats
* [Local GC] Event ports: GCCreateSegment
* [Local GC] Event ports: GCFreeSegment
* Event ports: GCCreateConcurrentThread and GCTerminateConcurrentThread
* [Local GC] Event ports: GCTriggered
* [Local GC] Event ports: GCMarkWithType
* [Local GC] Event ports: GCJoin_V2
* [Local GC] Event ports: GCGlobalHeapHistory_V2
* [Local GC] Event ports: GCAllocationTick_V3
* [Local GC] Event ports: GCAllocationTick_V1
* [Local GC] Event porting: PinObjectAtGCTime
* one last merge conflict
Diffstat (limited to 'src/vm/eventtrace.cpp')
-rw-r--r-- | src/vm/eventtrace.cpp | 78 |
1 files changed, 2 insertions, 76 deletions
diff --git a/src/vm/eventtrace.cpp b/src/vm/eventtrace.cpp index 533a3bc7fa..5fb63c90fe 100644 --- a/src/vm/eventtrace.cpp +++ b/src/vm/eventtrace.cpp @@ -874,15 +874,14 @@ VOID ETW::GCLog::ForceGC(LONGLONG l64ClientSequenceNumber) //--------------------------------------------------------------------------------------- // // Helper to fire the GCStart event. Figures out which version of GCStart to fire, and -// includes the client sequence number, if available. Also logs the generation range -// events. +// includes the client sequence number, if available. // // Arguments: // pGcInfo - ETW_GC_INFO containing details from GC about this collection // // static -VOID ETW::GCLog::FireGcStartAndGenerationRanges(ETW_GC_INFO * pGcInfo) +VOID ETW::GCLog::FireGcStart(ETW_GC_INFO * pGcInfo) { LIMITED_METHOD_CONTRACT; @@ -902,81 +901,8 @@ VOID ETW::GCLog::FireGcStartAndGenerationRanges(ETW_GC_INFO * pGcInfo) } FireEtwGCStart_V2(pGcInfo->GCStart.Count, pGcInfo->GCStart.Depth, pGcInfo->GCStart.Reason, pGcInfo->GCStart.Type, GetClrInstanceId(), l64ClientSequenceNumberToLog); - - // Fire an event per range per generation - IGCHeap *hp = GCHeapUtilities::GetGCHeap(); - hp->DiagDescrGenerations(FireSingleGenerationRangeEvent, NULL /* context */); - } -} - - -//--------------------------------------------------------------------------------------- -// -// Helper to fire the GCEnd event and the generation range events. -// -// Arguments: -// Count - (matching Count from corresponding GCStart event0 -// Depth - (matching Depth from corresponding GCStart event0 -// -// - -// static -VOID ETW::GCLog::FireGcEndAndGenerationRanges(ULONG Count, ULONG Depth) -{ - LIMITED_METHOD_CONTRACT; - - if (ETW_TRACING_CATEGORY_ENABLED( - MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER_Context, - TRACE_LEVEL_INFORMATION, - CLR_GC_KEYWORD)) - { - // Fire an event per range per generation - IGCHeap *hp = GCHeapUtilities::GetGCHeap(); - hp->DiagDescrGenerations(FireSingleGenerationRangeEvent, NULL /* context */); - - // GCEnd - FireEtwGCEnd_V1(Count, Depth, GetClrInstanceId()); } } - -//--------------------------------------------------------------------------------------- -// -// Callback made by GC when we call GCHeapUtilities::DiagDescrGenerations(). This is -// called once per range per generation, and results in a single ETW event per range per -// generation. -// -// Arguments: -// context - unused -// generation - Generation number -// rangeStart - Where does this range start? -// rangeEnd - How large is the used portion of this range? -// rangeEndReserved - How large is the reserved portion of this range? -// - -// static -VOID ETW::GCLog::FireSingleGenerationRangeEvent( - void * /* context */, - int generation, - BYTE * rangeStart, - BYTE * rangeEnd, - BYTE * rangeEndReserved) -{ - CONTRACT_VOID - { - NOTHROW; - GC_NOTRIGGER; - MODE_ANY; // can be called even on GC threads - PRECONDITION(0 <= generation && generation <= 3); - PRECONDITION(CheckPointer(rangeStart)); - PRECONDITION(CheckPointer(rangeEnd)); - PRECONDITION(CheckPointer(rangeEndReserved)); - } - CONTRACT_END; - - FireEtwGCGenerationRange((BYTE) generation, rangeStart, rangeEnd - rangeStart, rangeEndReserved - rangeStart, GetClrInstanceId()); - - RETURN; -} //--------------------------------------------------------------------------------------- // |