-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Expand file tree
/
Copy patheventtrace.cpp
More file actions
508 lines (443 loc) · 19.5 KB
/
Copy patheventtrace.cpp
File metadata and controls
508 lines (443 loc) · 19.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
// File: eventtrace.cpp
// Abstract: This module implements Event Tracing support
//
// ============================================================================
#include "common.h"
#include "gcenv.h"
#include "gcheaputilities.h"
#include "daccess.h"
#include "eventtrace_etw.h"
#include "eventtracebase.h"
#include "eventtrace_context.h"
#include "thread.h"
#include "threadstore.h"
#include "threadstore.inl"
#include <minipal/utf8.h>
EVENTPIPE_TRACE_CONTEXT MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER_EVENTPIPE_Context = { W("Microsoft-Windows-DotNETRuntime"), 0, false, 0 };
DOTNET_TRACE_CONTEXT MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER_DOTNET_Context = {
#ifdef FEATURE_ETW
&MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER_Context,
#endif
MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER_EVENTPIPE_Context
};
EVENTPIPE_TRACE_CONTEXT MICROSOFT_WINDOWS_DOTNETRUNTIME_RUNDOWN_PROVIDER_EVENTPIPE_Context = { W("Microsoft-Windows-DotNETRuntimeRundown"), 0, false, 0 };
DOTNET_TRACE_CONTEXT MICROSOFT_WINDOWS_DOTNETRUNTIME_RUNDOWN_PROVIDER_DOTNET_Context = {
#ifdef FEATURE_ETW
&MICROSOFT_WINDOWS_DOTNETRUNTIME_RUNDOWN_PROVIDER_Context,
#endif
MICROSOFT_WINDOWS_DOTNETRUNTIME_RUNDOWN_PROVIDER_EVENTPIPE_Context
};
EVENTPIPE_TRACE_CONTEXT MICROSOFT_WINDOWS_DOTNETRUNTIME_PRIVATE_PROVIDER_EVENTPIPE_Context = { W("Microsoft-Windows-DotNETRuntimePrivate"), 0, false, 0 };
DOTNET_TRACE_CONTEXT MICROSOFT_WINDOWS_DOTNETRUNTIME_PRIVATE_PROVIDER_DOTNET_Context = {
#ifdef FEATURE_ETW
&MICROSOFT_WINDOWS_DOTNETRUNTIME_PRIVATE_PROVIDER_Context,
#endif
MICROSOFT_WINDOWS_DOTNETRUNTIME_PRIVATE_PROVIDER_EVENTPIPE_Context
};
bool IsRuntimeProviderEnabled(uint8_t level, uint64_t keyword)
{
return RUNTIME_PROVIDER_CATEGORY_ENABLED(level, keyword);
}
bool IsRuntimeRundownProviderEnabled(uint8_t level, uint64_t keyword)
{
return RUNTIME_RUNDOWN_PROVIDER_CATEGORY_ENABLED(level, keyword);
}
volatile LONGLONG ETW::GCLog::s_l64LastClientSequenceNumber = 0;
//---------------------------------------------------------------------------------------
//
// Helper to fire the GCStart event. Figures out which version of GCStart to fire, and
// includes the client sequence number, if available.
//
// Arguments:
// pGcInfo - ETW_GC_INFO containing details from GC about this collection
//
// static
void ETW::GCLog::FireGcStart(ETW_GC_INFO* pGcInfo)
{
LIMITED_METHOD_CONTRACT;
if (RUNTIME_PROVIDER_CATEGORY_ENABLED(TRACE_LEVEL_INFORMATION, CLR_GC_KEYWORD))
{
// If the controller specified a client sequence number for us to log with this
// GCStart, then retrieve it
LONGLONG l64ClientSequenceNumberToLog = 0;
if ((s_l64LastClientSequenceNumber != 0) &&
(pGcInfo->GCStart.Depth == GCHeapUtilities::GetGCHeap()->GetMaxGeneration()) &&
(pGcInfo->GCStart.Reason == ETW_GC_INFO::GC_INDUCED))
{
// No InterlockedExchange64 on NativeAOT (presumably b/c there is no compiler
// intrinsic for this on x86, even though there is one for InterlockedCompareExchange64)
l64ClientSequenceNumberToLog = PalInterlockedCompareExchange64(&s_l64LastClientSequenceNumber, 0, s_l64LastClientSequenceNumber);
}
FireEtwGCStart_V2(pGcInfo->GCStart.Count, pGcInfo->GCStart.Depth, pGcInfo->GCStart.Reason, pGcInfo->GCStart.Type, GetClrInstanceId(), l64ClientSequenceNumberToLog);
}
}
void EventTracing_Initialize()
{
#ifdef FEATURE_ETW
MICROSOFT_WINDOWS_DOTNETRUNTIME_PRIVATE_PROVIDER_Context.IsEnabled = FALSE;
MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER_Context.IsEnabled = FALSE;
MICROSOFT_WINDOWS_DOTNETRUNTIME_RUNDOWN_PROVIDER_Context.IsEnabled = FALSE;
// Register the ETW providers with the system.
EventRegisterMicrosoft_Windows_DotNETRuntimePrivate();
EventRegisterMicrosoft_Windows_DotNETRuntime();
EventRegisterMicrosoft_Windows_DotNETRuntimeRundown();
MICROSOFT_WINDOWS_DOTNETRUNTIME_PRIVATE_PROVIDER_Context.RegistrationHandle = Microsoft_Windows_DotNETRuntimePrivateHandle;
MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER_Context.RegistrationHandle = Microsoft_Windows_DotNETRuntimeHandle;
MICROSOFT_WINDOWS_DOTNETRUNTIME_RUNDOWN_PROVIDER_Context.RegistrationHandle = Microsoft_Windows_DotNETRuntimeRundownHandle;
#endif // FEATURE_ETW
}
enum CallbackProviderIndex
{
DotNETRuntime = 0,
DotNETRuntimeRundown = 1,
DotNETRuntimeStress = 2,
DotNETRuntimePrivate = 3
};
enum SessionChange
{
EventPipeSessionDisable = 0,
EventPipeSessionEnable = 1,
EtwSessionChangeUnknown = 2
};
#ifdef FEATURE_ETW
// EventFilterType identifies the filter type used by the PEVENT_FILTER_DESCRIPTOR
enum EventFilterType
{
// data should be pairs of UTF8 null terminated strings all concatenated together.
// The first element of the pair is the key and the 2nd is the value. We expect one of the
// keys to be the string "GCSeqNumber" and the value to be a number encoded as text.
// This is the standard way EventPipe encodes filter values
StringKeyValueEncoding = 0,
// data should be an 8 byte binary LONGLONG value
// this is the historic encoding defined by .NET Framework for use with ETW
LongBinaryClientSequenceNumber = 1
};
void ParseFilterDataClientSequenceNumber(
EVENT_FILTER_DESCRIPTOR * FilterData,
LONGLONG * pClientSequenceNumber)
{
if (FilterData == NULL)
return;
if (FilterData->Type == LongBinaryClientSequenceNumber && FilterData->Size == sizeof(LONGLONG))
{
*pClientSequenceNumber = *(LONGLONG *) (FilterData->Ptr);
}
else if (FilterData->Type == StringKeyValueEncoding)
{
const char* buffer = reinterpret_cast<const char*>(FilterData->Ptr);
const char* buffer_end = buffer + FilterData->Size;
while (buffer < buffer_end)
{
const char* key = buffer;
size_t key_len = strnlen(key, buffer_end - buffer);
buffer += key_len + 1;
if (buffer >= buffer_end)
break;
const char* value = buffer;
size_t value_len = strnlen(value, buffer_end - buffer);
buffer += value_len + 1;
if (buffer > buffer_end)
break;
if (strcmp(key, "GCSeqNumber") != 0)
continue;
char* endPtr = nullptr;
long parsedValue = strtol(value, &endPtr, 10);
if (endPtr != value && *endPtr == '\0')
{
*pClientSequenceNumber = static_cast<LONGLONG>(parsedValue);
break;
}
}
}
}
#endif // FEATURE_ETW
// NOTE: When multiple ETW or EventPipe sessions are enabled, the ControlCode will be
// EVENT_CONTROL_CODE_ENABLE_PROVIDER even if the session invoking this callback is being disabled.
void EtwCallbackCommon(
CallbackProviderIndex ProviderIndex,
ULONG ControlCode,
unsigned char Level,
ULONGLONG MatchAnyKeyword,
PVOID pFilterData,
SessionChange Change)
{
// LIMITED_METHOD_CONTRACT;
bool bIsPublicTraceHandle = ProviderIndex == DotNETRuntime;
DOTNET_TRACE_CONTEXT * ctxToUpdate;
switch(ProviderIndex)
{
case DotNETRuntime:
ctxToUpdate = &MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER_DOTNET_Context;
break;
case DotNETRuntimeRundown:
ctxToUpdate = &MICROSOFT_WINDOWS_DOTNETRUNTIME_RUNDOWN_PROVIDER_DOTNET_Context;
break;
case DotNETRuntimePrivate:
ctxToUpdate = &MICROSOFT_WINDOWS_DOTNETRUNTIME_PRIVATE_PROVIDER_DOTNET_Context;
break;
default:
_ASSERTE(!"EtwCallbackCommon was called with invalid context");
return;
}
// This callback gets called on both ETW/EventPipe session enable/disable.
// We need toupdate the EventPipe provider context if we are in a callback
// from EventPipe, but not from ETW.
if (Change == EventPipeSessionEnable || Change == EventPipeSessionDisable)
{
ctxToUpdate->EventPipeProvider.Level = Level;
ctxToUpdate->EventPipeProvider.EnabledKeywordsBitmask = MatchAnyKeyword;
ctxToUpdate->EventPipeProvider.IsEnabled = ControlCode;
// For EventPipe, ControlCode can only be either 0 or 1.
_ASSERTE(ControlCode == EVENT_CONTROL_CODE_DISABLE_PROVIDER || ControlCode == EVENT_CONTROL_CODE_ENABLE_PROVIDER);
}
if (
#ifdef FEATURE_ETW
(ControlCode == EVENT_CONTROL_CODE_ENABLE_PROVIDER || ControlCode == EVENT_CONTROL_CODE_DISABLE_PROVIDER) &&
#endif
(ProviderIndex == DotNETRuntime || ProviderIndex == DotNETRuntimePrivate))
{
#ifdef FEATURE_ETW
// Consolidate level and keywords across event pipe and ETW contexts.
// ETW may still want to see events that event pipe doesn't care about and vice versa
GCEventKeyword keywords = static_cast<GCEventKeyword>(ctxToUpdate->EventPipeProvider.EnabledKeywordsBitmask |
ctxToUpdate->EtwProvider->MatchAnyKeyword);
GCEventLevel level = static_cast<GCEventLevel>(max(ctxToUpdate->EventPipeProvider.Level,
ctxToUpdate->EtwProvider->Level));
#else
GCEventKeyword keywords = static_cast<GCEventKeyword>(ctxToUpdate->EventPipeProvider.EnabledKeywordsBitmask);
GCEventLevel level = static_cast<GCEventLevel>(ctxToUpdate->EventPipeProvider.Level);
#endif
GCHeapUtilities::RecordEventStateChange(bIsPublicTraceHandle, keywords, level);
}
// Special check for a profiler requested GC.
// A full GC will be forced if:
// 1. The GC Heap is initialized.
// 2. The public provider is requesting GC.
// 3. The provider's ManagedHeapCollectKeyword is enabled.
// 4. If it is an ETW provider, the control code is to enable or capture the state of the provider.
// 5. If it is an EventPipe provider, the session is not being disabled.
bool bValidGCRequest =
GCHeapUtilities::IsGCHeapInitialized() &&
bIsPublicTraceHandle &&
((MatchAnyKeyword & CLR_MANAGEDHEAPCOLLECT_KEYWORD) != 0) &&
((ControlCode == EVENT_CONTROL_CODE_ENABLE_PROVIDER) ||
(ControlCode == EVENT_CONTROL_CODE_CAPTURE_STATE)) &&
((Change == EtwSessionChangeUnknown) ||
(Change == EventPipeSessionEnable));
if (bValidGCRequest)
{
// Profilers may (optionally) specify extra data in the filter parameter
// to log with the GCStart event.
LONGLONG l64ClientSequenceNumber = 0;
#if !defined(HOST_UNIX)
ParseFilterDataClientSequenceNumber((EVENT_FILTER_DESCRIPTOR*)pFilterData, &l64ClientSequenceNumber);
#endif // !defined(HOST_UNIX)
ETW::GCLog::ForceGC(l64ClientSequenceNumber);
}
}
#ifdef FEATURE_ETW
void EtwCallback(
const GUID * /*SourceId*/,
uint32_t ControlCode,
uint8_t Level,
uint64_t MatchAnyKeyword,
uint64_t MatchAllKeyword,
EVENT_FILTER_DESCRIPTOR * FilterData,
void * CallbackContext)
{
MCGEN_TRACE_CONTEXT * context = (MCGEN_TRACE_CONTEXT*)CallbackContext;
if (context == NULL)
return;
// 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,
// IsEnabled will be TRUE when it is enabled and FALSE when disabled
BOOL bEnabled =
((ControlCode == EVENT_CONTROL_CODE_ENABLE_PROVIDER) ||
(ControlCode == EVENT_CONTROL_CODE_CAPTURE_STATE));
context->Level = Level;
context->MatchAnyKeyword = MatchAnyKeyword;
context->MatchAllKeyword = MatchAllKeyword;
context->IsEnabled = bEnabled;
CallbackProviderIndex providerIndex = DotNETRuntime;
DOTNET_TRACE_CONTEXT providerContext = MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER_DOTNET_Context;
if (context->RegistrationHandle == Microsoft_Windows_DotNETRuntimeHandle) {
providerIndex = DotNETRuntime;
providerContext = MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER_DOTNET_Context;
} else if (context->RegistrationHandle == Microsoft_Windows_DotNETRuntimeRundownHandle) {
providerIndex = DotNETRuntimeRundown;
providerContext = MICROSOFT_WINDOWS_DOTNETRUNTIME_RUNDOWN_PROVIDER_DOTNET_Context;
} else if (context->RegistrationHandle == Microsoft_Windows_DotNETRuntimePrivateHandle) {
providerIndex = DotNETRuntimePrivate;
providerContext = MICROSOFT_WINDOWS_DOTNETRUNTIME_PRIVATE_PROVIDER_DOTNET_Context;
} else {
_ASSERTE(!"Unknown registration handle");
return;
}
EtwCallbackCommon(providerIndex, ControlCode, Level, MatchAnyKeyword, FilterData, EtwSessionChangeUnknown);
if (bEnabled)
{
if (context->RegistrationHandle == Microsoft_Windows_DotNETRuntimePrivateHandle &&
GCHeapUtilities::IsGCHeapInitialized())
{
FireEtwGCSettings_V1(GCHeapUtilities::GetGCHeap()->GetValidSegmentSize(FALSE),
GCHeapUtilities::GetGCHeap()->GetValidSegmentSize(TRUE),
GCHeapUtilities::IsServerHeap(), GetClrInstanceId());
GCHeapUtilities::GetGCHeap()->DiagTraceGCSegments();
}
if (context->RegistrationHandle == Microsoft_Windows_DotNETRuntimeRundownHandle)
{
if (IsRuntimeRundownProviderEnabled(TRACE_LEVEL_INFORMATION, CLR_RUNDOWNEND_KEYWORD))
ETW::EnumerationLog::EndRundown();
}
}
}
#endif // FEATURE_ETW
void ETW::LoaderLog::ModuleLoad(HANDLE pModule)
{
if (IsRuntimeProviderEnabled(TRACE_LEVEL_INFORMATION, KEYWORDZERO))
{
SendModuleEvent(pModule, ETW::EnumerationLog::EnumerationStructs::DomainAssemblyModuleLoad);
}
}
//---------------------------------------------------------------------------------------
//
// send a module load/unload or rundown event and domainmodule load and rundown event
//
// Arguments:
// * pModule - Module loading or unloading
// * dwEventOptions - Bitmask of which events to fire
//
void ETW::LoaderLog::SendModuleEvent(HANDLE pModule, uint32_t dwEventOptions)
{
const WCHAR * wszModuleFileName = NULL;
const WCHAR * wszModuleILFileName = W("");
#if TARGET_WINDOWS
PalGetModuleFileName(&wszModuleFileName, pModule);
#else
const char * wszModuleFileNameUtf8 = NULL;
uint32_t moduleFileNameCharCount = PalGetModuleFileName(&wszModuleFileNameUtf8, pModule);
CHAR16_T wszModuleFileNameUnicode[1024];
minipal_convert_utf8_to_utf16(wszModuleFileNameUtf8, moduleFileNameCharCount, &wszModuleFileNameUnicode[0], ARRAY_SIZE(wszModuleFileNameUnicode), MINIPAL_MB_NO_REPLACE_INVALID_CHARS);
wszModuleFileName = (const WCHAR *)&wszModuleFileNameUnicode[0];
#endif
GUID nativeGuid;
uint32_t dwAge;
WCHAR wszPath[1024];
uint32_t cbBuildId;
void* pBuildId;
PalGetPDBInfo(pModule, &nativeGuid, &dwAge, wszPath, ARRAY_SIZE(wszPath), &cbBuildId, &pBuildId);
WCHAR wszBuildId[65];
size_t written = 0;
for (size_t i = 0; i < cbBuildId; i++)
{
if (written + 3 <= ARRAY_SIZE(wszBuildId)) { // 2 hex digits + 1 null terminator
const WCHAR* hexDigits = W("0123456789ABCDEF");
// Convert each byte to hex and append to the output string
uint8_t c = ((uint8_t*)pBuildId)[i];
wszBuildId[written++] = hexDigits[c >> 4];
wszBuildId[written++] = hexDigits[c & 0xF];
} else {
// If buffer not enough to fit, truncate
break;
}
}
wszBuildId[written] = 0;
GUID zeroGuid = { 0 };
if (dwEventOptions & ETW::EnumerationLog::EnumerationStructs::DomainAssemblyModuleLoad)
{
FireEtwModuleLoad_V3(
ULONGLONG(pModule),
0, // AssemblyID
ETW::LoaderLog::LoaderStructs::NativeModule, // Module Flags
0, // Reserved1,
wszModuleILFileName, // ModuleILPath,
wszModuleFileName, // ModuleNativePath,
GetClrInstanceId(),
&zeroGuid, // ManagedPdbSignature,
0, // ManagedPdbAge,
NULL, // ManagedPdbBuildPath,
&nativeGuid, // NativePdbSignature,
dwAge, // NativePdbAge,
wszPath, // NativePdbBuildPath,
wszBuildId // NativeBuildId,
);
}
else if (dwEventOptions & ETW::EnumerationLog::EnumerationStructs::DomainAssemblyModuleDCEnd)
{
FireEtwModuleDCEnd_V3(
ULONGLONG(pModule),
0, // AssemblyID
ETW::LoaderLog::LoaderStructs::NativeModule, // Module Flags
0, // Reserved1,
wszModuleILFileName, // ModuleILPath,
wszModuleFileName, // ModuleNativePath,
GetClrInstanceId(),
&zeroGuid, // ManagedPdbSignature,
0, // ManagedPdbAge,
NULL, // ManagedPdbBuildPath,
&nativeGuid, // NativePdbSignature,
dwAge, // NativePdbAge,
wszPath, // NativePdbBuildPath,
wszBuildId // NativeBuildId,
);
}
else
{
ASSERT(0);
}
}
/**************************************************************************************/
/* Called when ETW is turned OFF on an existing process .Will be used by the controller for end rundown*/
/**************************************************************************************/
void ETW::EnumerationLog::EndRundown()
{
if (IsRuntimeRundownProviderEnabled(TRACE_LEVEL_INFORMATION, CLR_RUNDOWNLOADER_KEYWORD))
{
// begin marker event will go to the rundown provider
FireEtwDCEndInit_V1(GetClrInstanceId());
HANDLE pModule = PalGetModuleHandleFromPointer((void*)&EndRundown);
LoaderLog::SendModuleEvent(pModule, EnumerationLog::EnumerationStructs::DomainAssemblyModuleDCEnd);
// end marker event will go to the rundown provider
FireEtwDCEndComplete_V1(GetClrInstanceId());
}
}
void EventPipeEtwCallbackDotNETRuntime(
_In_ GUID * SourceId,
_In_ ULONG ControlCode,
_In_ unsigned char Level,
_In_ ULONGLONG MatchAnyKeyword,
_In_ ULONGLONG MatchAllKeyword,
_In_opt_ EventFilterDescriptor* FilterData,
_Inout_opt_ PVOID CallbackContext)
{
SessionChange change = SourceId == NULL ? EventPipeSessionDisable : EventPipeSessionEnable;
EtwCallbackCommon(DotNETRuntime, ControlCode, Level, MatchAnyKeyword, FilterData, change);
}
void EventPipeEtwCallbackDotNETRuntimeRundown(
_In_ GUID * SourceId,
_In_ ULONG ControlCode,
_In_ unsigned char Level,
_In_ ULONGLONG MatchAnyKeyword,
_In_ ULONGLONG MatchAllKeyword,
_In_opt_ EventFilterDescriptor* FilterData,
_Inout_opt_ PVOID CallbackContext)
{
SessionChange change = SourceId == NULL ? EventPipeSessionDisable : EventPipeSessionEnable;
EtwCallbackCommon(DotNETRuntimeRundown, ControlCode, Level, MatchAnyKeyword, FilterData, change);
}
void EventPipeEtwCallbackDotNETRuntimePrivate(
_In_ GUID * SourceId,
_In_ ULONG ControlCode,
_In_ unsigned char Level,
_In_ ULONGLONG MatchAnyKeyword,
_In_ ULONGLONG MatchAllKeyword,
_In_opt_ EventFilterDescriptor* FilterData,
_Inout_opt_ PVOID CallbackContext)
{
SessionChange change = SourceId == NULL ? EventPipeSessionDisable : EventPipeSessionEnable;
EtwCallbackCommon(DotNETRuntimePrivate, ControlCode, Level, MatchAnyKeyword, FilterData, change);
}