Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make firing of ETW events in nativeaot opt-in via the enabled/disabled lib #88800

Merged
merged 4 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions src/coreclr/nativeaot/Runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ set(COMMON_RUNTIME_SOURCES
TypeManager.cpp
ObjectLayout.cpp
portable.cpp
profheapwalkhelper.cpp
RestrictedCallouts.cpp
RhConfig.cpp
RuntimeInstance.cpp
Expand Down Expand Up @@ -220,18 +219,6 @@ endif()

if(FEATURE_EVENT_TRACE)
add_definitions(-DFEATURE_EVENT_TRACE)
list(APPEND COMMON_RUNTIME_SOURCES
eventtrace.cpp
)
# These are carry-overs from .NET Native and only included on Windows currently
# bulktype : directly emits via ETW with EventWrite
# gcheap : GCHeapDump, GCHeapSurvivalAndMovement - not prioritizing for nativeaot yet
if (WIN32)
list(APPEND COMMON_RUNTIME_SOURCES
eventtrace_bulktype.cpp
eventtrace_gcheap.cpp
)
endif()
endif()

add_definitions(-DFEATURE_BASICFREEZE)
Expand All @@ -252,6 +239,7 @@ add_definitions(-D_LIB)
# add_definitions(-DSTRESS_HEAP)

if(WIN32)
set(FEATURE_ETW 1)
add_definitions(-DFEATURE_ETW)
add_definitions(-DFEATURE_SUSPEND_REDIRECTION)
add_definitions(-DFEATURE_SPECIAL_USER_MODE_APC)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.

void EventPipeAdapter_Initialize() {}
bool EventPipeAdapter_Enabled() { return false; }

bool DiagnosticServerAdapter_Initialize() { return false; }
void DiagnosticServerAdapter_PauseForDiagnosticsMonitor() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "SpinLock.h"

void EventPipeAdapter_Initialize() { EventPipeAdapter::Initialize(); }
bool EventPipeAdapter_Enabled() { return EventPipeAdapter::Enabled(); }

bool DiagnosticServerAdapter_Initialize() { return DiagnosticServerAdapter::Initialize(); }
void DiagnosticServerAdapter_PauseForDiagnosticsMonitor() { DiagnosticServerAdapter::PauseForDiagnosticsMonitor();}
Expand Down
125 changes: 43 additions & 82 deletions src/coreclr/nativeaot/Runtime/EtwEvents.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/coreclr/nativeaot/Runtime/EventPipeInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

// Initialize EventPipe
void EventPipeAdapter_Initialize();
bool EventPipeAdapter_Enabled();

// Initialize DS
bool DiagnosticServerAdapter_Initialize();
Expand All @@ -18,4 +17,5 @@ void EventPipeAdapter_FinishInitialize();
void EventPipeAdapter_Shutdown();
bool DiagnosticServerAdapter_Shutdown();

void EventTracing_Initialize();
#endif //EVENTPIPE_INTERFACE_H
9 changes: 2 additions & 7 deletions src/coreclr/nativeaot/Runtime/PalRedhawk.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#include <sal.h>
#include <stdarg.h>
#include "CommonTypes.h"
#include "CommonMacros.h"
#include "gcenv.structs.h" // CRITICAL_SECTION
#include "IntrinsicConstants.h"
#include "PalRedhawkCommon.h"
Expand Down Expand Up @@ -91,13 +93,6 @@ typedef union _LARGE_INTEGER {
int64_t QuadPart;
} LARGE_INTEGER, *PLARGE_INTEGER;

typedef struct _GUID {
uint32_t Data1;
uint16_t Data2;
uint16_t Data3;
uint8_t Data4[8];
} GUID;

#define DECLARE_HANDLE(_name) typedef HANDLE _name

struct FILETIME
Expand Down
Loading