Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 89091b5

Browse files
author
John Salem
authored
[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)
1 parent a31b0b1 commit 89091b5

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/vm/eventtrace.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,7 @@ void BulkComLogger::FlushRcw()
11351135
#else
11361136
ULONG result = FireEtXplatGCBulkRCW(m_currRcw, instance, sizeof(EventRCWEntry) * m_currRcw, m_etwRcwData);
11371137
#endif // !defined(FEATURE_PAL)
1138+
result |= EventPipeWriteEventGCBulkRCW(m_currRcw, instance, sizeof(EventRCWEntry) * m_currRcw, m_etwRcwData);
11381139

11391140
_ASSERTE(result == ERROR_SUCCESS);
11401141

@@ -1224,6 +1225,7 @@ void BulkComLogger::FlushCcw()
12241225
#else
12251226
ULONG result = FireEtXplatGCBulkRootCCW(m_currCcw, instance, sizeof(EventCCWEntry) * m_currCcw, m_etwCcwData);
12261227
#endif //!defined(FEATURE_PAL)
1228+
result |= EventPipeWriteEventGCBulkRootCCW(m_currCcw, instance, sizeof(EventCCWEntry) * m_currCcw, m_etwCcwData);
12271229

12281230
_ASSERTE(result == ERROR_SUCCESS);
12291231

@@ -1428,6 +1430,7 @@ void BulkStaticsLogger::FireBulkStaticsEvent()
14281430
#else
14291431
ULONG result = FireEtXplatGCBulkRootStaticVar(m_count, appDomain, instance, m_used, m_buffer);
14301432
#endif //!defined(FEATURE_PAL)
1433+
result |= EventPipeWriteEventGCBulkRootStaticVar(m_count, appDomain, instance, m_used, m_buffer);
14311434

14321435
_ASSERTE(result == ERROR_SUCCESS);
14331436

@@ -4269,6 +4272,12 @@ VOID EtwCallbackCommon(
42694272
#endif // !defined(FEATURE_PAL)
42704273
ETW::GCLog::ForceGC(l64ClientSequenceNumber);
42714274
}
4275+
// TypeSystemLog needs a notification when certain keywords are modified, so
4276+
// give it a hook here.
4277+
if (g_fEEStarted && !g_fEEShutDown && bIsPublicTraceHandle)
4278+
{
4279+
ETW::TypeSystemLog::OnKeywordsChanged();
4280+
}
42724281
}
42734282

42744283
// Individual callbacks for each EventPipe provider.
@@ -4488,13 +4497,6 @@ extern "C"
44884497

44894498
EtwCallbackCommon(providerIndex, ControlCode, Level, MatchAnyKeyword, FilterData, false);
44904499

4491-
// TypeSystemLog needs a notification when certain keywords are modified, so
4492-
// give it a hook here.
4493-
if (g_fEEStarted && !g_fEEShutDown && bIsPublicTraceHandle)
4494-
{
4495-
ETW::TypeSystemLog::OnKeywordsChanged();
4496-
}
4497-
44984500
// A manifest based provider can be enabled to multiple event tracing sessions
44994501
// As long as there is atleast 1 enabled session, IsEnabled will be TRUE
45004502
// Since classic providers can be enabled to only a single session,

0 commit comments

Comments
 (0)