diff options
author | John Salem <josalem@microsoft.com> | 2019-10-21 11:22:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-21 11:22:50 -0700 |
commit | 89091b51f3a4ececbf2af2e9fff6f9400efe8191 (patch) | |
tree | 8f23b494c512918bf8b0bf36ced6d653d6853b0c | |
parent | a31b0b170f7cbcf3d669a2d03ea951e95ca290ea (diff) | |
download | coreclr-89091b51f3a4ececbf2af2e9fff6f9400efe8191.tar.gz coreclr-89091b51f3a4ececbf2af2e9fff6f9400efe8191.tar.bz2 coreclr-89091b51f3a4ececbf2af2e9fff6f9400efe8191.zip |
[3.1] Backport fixes to ETW/EventPipe events to enable GCDumps (#27297)
* Move TypeSystemLog::OnKeywordsChanged from EtwCallback to EtwCallbackCommon to enable this same behavior in ETW and EventPipe. This unblocks parity for GCHeapDumps between ETW and EventPipe (#26270)
* Fix unique ETW events for GC Type logging, so they are also fired across EventPipe (#27250)
-rw-r--r-- | src/vm/eventtrace.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/vm/eventtrace.cpp b/src/vm/eventtrace.cpp index 36235d605b..f5f6389d89 100644 --- a/src/vm/eventtrace.cpp +++ b/src/vm/eventtrace.cpp @@ -1135,6 +1135,7 @@ void BulkComLogger::FlushRcw() #else ULONG result = FireEtXplatGCBulkRCW(m_currRcw, instance, sizeof(EventRCWEntry) * m_currRcw, m_etwRcwData); #endif // !defined(FEATURE_PAL) + result |= EventPipeWriteEventGCBulkRCW(m_currRcw, instance, sizeof(EventRCWEntry) * m_currRcw, m_etwRcwData); _ASSERTE(result == ERROR_SUCCESS); @@ -1224,6 +1225,7 @@ void BulkComLogger::FlushCcw() #else ULONG result = FireEtXplatGCBulkRootCCW(m_currCcw, instance, sizeof(EventCCWEntry) * m_currCcw, m_etwCcwData); #endif //!defined(FEATURE_PAL) + result |= EventPipeWriteEventGCBulkRootCCW(m_currCcw, instance, sizeof(EventCCWEntry) * m_currCcw, m_etwCcwData); _ASSERTE(result == ERROR_SUCCESS); @@ -1428,6 +1430,7 @@ void BulkStaticsLogger::FireBulkStaticsEvent() #else ULONG result = FireEtXplatGCBulkRootStaticVar(m_count, appDomain, instance, m_used, m_buffer); #endif //!defined(FEATURE_PAL) + result |= EventPipeWriteEventGCBulkRootStaticVar(m_count, appDomain, instance, m_used, m_buffer); _ASSERTE(result == ERROR_SUCCESS); @@ -4269,6 +4272,12 @@ VOID EtwCallbackCommon( #endif // !defined(FEATURE_PAL) ETW::GCLog::ForceGC(l64ClientSequenceNumber); } + // TypeSystemLog needs a notification when certain keywords are modified, so + // give it a hook here. + if (g_fEEStarted && !g_fEEShutDown && bIsPublicTraceHandle) + { + ETW::TypeSystemLog::OnKeywordsChanged(); + } } // Individual callbacks for each EventPipe provider. @@ -4488,13 +4497,6 @@ extern "C" EtwCallbackCommon(providerIndex, ControlCode, Level, MatchAnyKeyword, FilterData, false); - // TypeSystemLog needs a notification when certain keywords are modified, so - // give it a hook here. - if (g_fEEStarted && !g_fEEShutDown && bIsPublicTraceHandle) - { - ETW::TypeSystemLog::OnKeywordsChanged(); - } - // A manifest based provider can be enabled to multiple event tracing sessions // As long as there is atleast 1 enabled session, IsEnabled will be TRUE // Since classic providers can be enabled to only a single session, |