10
10
//
11
11
12
12
//
13
- //
13
+ //
14
14
// #EventTracing
15
15
// Windows
16
16
// ETW (Event Tracing for Windows) is a high-performance, low overhead and highly scalable
@@ -35,7 +35,7 @@ void InitializeEventTracing();
35
35
// The flags must match those in the ETW manifest exactly
36
36
// !!!!!!! NOTE !!!!!!!!
37
37
38
- // These flags need to be defined either when FEATURE_EVENT_TRACE is enabled or the
38
+ // These flags need to be defined either when FEATURE_EVENT_TRACE is enabled or the
39
39
// PROFILING_SUPPORTED is set, since they are used both by event tracing and profiling.
40
40
41
41
enum EtwTypeFlags
@@ -106,7 +106,7 @@ enum EtwThreadFlags
106
106
#define ETW_TRACING_CATEGORY_ENABLED (Context, Level, Keyword ) (EventPipeHelper::Enabled() || XplatEventLogger::IsEventLoggingEnabled())
107
107
#define ETW_PROVIDER_ENABLED (ProviderSymbol ) (TRUE )
108
108
#else // defined(FEATURE_PERFTRACING)
109
- #define ETW_INLINE
109
+ #define ETW_INLINE
110
110
#define ETWOnStartup (StartEventName, EndEventName )
111
111
#define ETWFireEvent (EventName )
112
112
@@ -242,13 +242,15 @@ class EventPipeHelper
242
242
243
243
#if defined(FEATURE_EVENT_TRACE)
244
244
245
+ struct EventFilterDescriptor ;
246
+
245
247
VOID EventPipeEtwCallbackDotNETRuntimeStress (
246
248
_In_ LPCGUID SourceId,
247
249
_In_ ULONG ControlCode,
248
250
_In_ UCHAR Level,
249
251
_In_ ULONGLONG MatchAnyKeyword,
250
252
_In_ ULONGLONG MatchAllKeyword,
251
- _In_opt_ PVOID FilterData,
253
+ _In_opt_ EventFilterDescriptor* FilterData,
252
254
_Inout_opt_ PVOID CallbackContext);
253
255
254
256
VOID EventPipeEtwCallbackDotNETRuntime (
@@ -257,7 +259,7 @@ VOID EventPipeEtwCallbackDotNETRuntime(
257
259
_In_ UCHAR Level,
258
260
_In_ ULONGLONG MatchAnyKeyword,
259
261
_In_ ULONGLONG MatchAllKeyword,
260
- _In_opt_ PVOID FilterData,
262
+ _In_opt_ EventFilterDescriptor* FilterData,
261
263
_Inout_opt_ PVOID CallbackContext);
262
264
263
265
VOID EventPipeEtwCallbackDotNETRuntimeRundown (
@@ -266,7 +268,7 @@ VOID EventPipeEtwCallbackDotNETRuntimeRundown(
266
268
_In_ UCHAR Level,
267
269
_In_ ULONGLONG MatchAnyKeyword,
268
270
_In_ ULONGLONG MatchAllKeyword,
269
- _In_opt_ PVOID FilterData,
271
+ _In_opt_ EventFilterDescriptor* FilterData,
270
272
_Inout_opt_ PVOID CallbackContext);
271
273
272
274
VOID EventPipeEtwCallbackDotNETRuntimePrivate (
@@ -275,7 +277,7 @@ VOID EventPipeEtwCallbackDotNETRuntimePrivate(
275
277
_In_ UCHAR Level,
276
278
_In_ ULONGLONG MatchAnyKeyword,
277
279
_In_ ULONGLONG MatchAllKeyword,
278
- _In_opt_ PVOID FilterData,
280
+ _In_opt_ EventFilterDescriptor* FilterData,
279
281
_Inout_opt_ PVOID CallbackContext);
280
282
281
283
#ifndef FEATURE_PAL
@@ -332,7 +334,7 @@ extern "C" {
332
334
333
335
#include " clretwallmain.h"
334
336
335
- #endif // FEATURE_EVENT_TRACE
337
+ #endif // FEATURE_EVENT_TRACE
336
338
337
339
/* *************************/
338
340
/* CLR ETW infrastructure */
@@ -351,7 +353,7 @@ extern "C" {
351
353
// has started, one may want to do something useful when that happens (e.g enumerate all the loaded modules
352
354
// in the system). To enable this, we have to implement a callback routine.
353
355
// file:../VM/eventtrace.cpp#EtwCallback is CLR's implementation of the callback.
354
- //
356
+ //
355
357
356
358
#include " daccess.h"
357
359
class Module ;
@@ -379,7 +381,7 @@ namespace ETW
379
381
{
380
382
// Class to wrap the ETW infrastructure logic
381
383
#if !defined(FEATURE_PAL)
382
- class CEtwTracer
384
+ class CEtwTracer
383
385
{
384
386
#if defined(FEATURE_EVENT_TRACE)
385
387
ULONG RegGuids (LPCGUID ProviderId, PENABLECALLBACK EnableCallback, PVOID CallbackContext, PREGHANDLE RegHandle);
@@ -391,7 +393,7 @@ namespace ETW
391
393
HRESULT Register ();
392
394
393
395
// Unregisters all the Event Tracing providers
394
- HRESULT UnRegister ();
396
+ HRESULT UnRegister ();
395
397
#else
396
398
HRESULT Register ()
397
399
{
@@ -406,7 +408,7 @@ namespace ETW
406
408
#endif // !defined(FEATURE_PAL)
407
409
408
410
class LoaderLog ;
409
- class MethodLog ;
411
+ class MethodLog ;
410
412
// Class to wrap all the enumeration logic for ETW
411
413
class EnumerationLog
412
414
{
@@ -447,7 +449,7 @@ namespace ETW
447
449
MethodDCEndILToNativeMap= 0x00020000 ,
448
450
JitMethodILToNativeMap= 0x00040000 ,
449
451
TypeUnload= 0x00080000 ,
450
-
452
+
451
453
// Helpers
452
454
ModuleRangeEnabledAny = ModuleRangeLoad | ModuleRangeDCStart | ModuleRangeDCEnd | ModuleRangeLoadPrivate,
453
455
JitMethodLoadOrDCStartAny = JitMethodLoad | JitMethodDCStart | MethodDCStartILToNativeMap,
@@ -475,7 +477,7 @@ namespace ETW
475
477
{
476
478
#if defined(FEATURE_EVENT_TRACE) && !defined(FEATURE_PAL)
477
479
public:
478
- typedef enum _EtwStackWalkStatus
480
+ typedef enum _EtwStackWalkStatus
479
481
{
480
482
Completed = 0 ,
481
483
UnInitialized = 1 ,
@@ -492,7 +494,7 @@ namespace ETW
492
494
EtwStackWalkStatus GetCurrentThreadsCallStack (UINT32 *frameCount, PVOID **Stack);
493
495
#endif // FEATURE_EVENT_TRACE && !defined(FEATURE_PAL)
494
496
};
495
-
497
+
496
498
// Class to wrap all Loader logic for ETW
497
499
class LoaderLog
498
500
{
@@ -537,9 +539,9 @@ namespace ETW
537
539
}RangeFlags;
538
540
539
541
}LoaderStructs;
540
-
542
+
541
543
static VOID DomainLoadReal (BaseDomain *pDomain, __in_opt LPWSTR wszFriendlyName=NULL );
542
-
544
+
543
545
static VOID DomainLoad (BaseDomain *pDomain, __in_opt LPWSTR wszFriendlyName = NULL )
544
546
{
545
547
if (ETW_PROVIDER_ENABLED (MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER))
@@ -733,7 +735,7 @@ namespace ETW
733
735
{
734
736
public:
735
737
typedef union _BinderStructs {
736
- typedef enum _NGENBINDREJECT_REASON {
738
+ typedef enum _NGENBINDREJECT_REASON {
737
739
NGEN_BIND_START_BIND = 0 ,
738
740
NGEN_BIND_NO_INDEX = 1 ,
739
741
NGEN_BIND_SYSTEM_ASSEMBLY_NOT_AVAILABLE = 2 ,
@@ -797,19 +799,19 @@ namespace ETW
797
799
IsCLSCompliant=0x10
798
800
}ExceptionThrownFlags;
799
801
}ExceptionStructs;
800
- };
802
+ };
801
803
// Class to wrap all Contention logic for ETW
802
804
class ContentionLog
803
805
{
804
806
public:
805
- typedef union _ContentionStructs
807
+ typedef union _ContentionStructs
806
808
{
807
- typedef enum _ContentionFlags {
809
+ typedef enum _ContentionFlags {
808
810
ManagedContention=0 ,
809
811
NativeContention=1
810
812
} ContentionFlags;
811
813
} ContentionStructs;
812
- };
814
+ };
813
815
// Class to wrap all Interop logic for ETW
814
816
class InteropLog
815
817
{
@@ -820,7 +822,7 @@ namespace ETW
820
822
class InfoLog
821
823
{
822
824
public:
823
- typedef union _InfoStructs
825
+ typedef union _InfoStructs
824
826
{
825
827
typedef enum _StartupMode
826
828
{
@@ -961,7 +963,7 @@ class ETWTraceStartup {
961
963
// "mc.exe -MOF" already generates this block for XP-suported builds inside ClrEtwAll.h;
962
964
// on Vista+ builds, mc is run without -MOF, and we still have code that depends on it, so
963
965
// we manually place it here.
964
- FORCEINLINE
966
+ FORCEINLINE
965
967
BOOLEAN __stdcall
966
968
McGenEventTracingEnabled (
967
969
__in PMCGEN_TRACE_CONTEXT EnableInfo,
@@ -1056,7 +1058,7 @@ struct CallStackFrame
1056
1058
#endif // FEATURE_EVENT_TRACE
1057
1059
1058
1060
#if defined(FEATURE_EVENT_TRACE) && !defined(FEATURE_PAL)
1059
- FORCEINLINE
1061
+ FORCEINLINE
1060
1062
BOOLEAN __stdcall
1061
1063
McGenEventProviderEnabled (
1062
1064
__in PMCGEN_TRACE_CONTEXT Context,
0 commit comments