diff --git a/src/coreclr/nativeaot/Runtime/CommonMacros.h b/src/coreclr/nativeaot/Runtime/CommonMacros.h index 8eb58f7312bf2b9d48b1d57d1a198f3e298c81ef..b6d96af6867853715b443e7991aef576367ee7e6 100644 --- a/src/coreclr/nativeaot/Runtime/CommonMacros.h +++ b/src/coreclr/nativeaot/Runtime/CommonMacros.h @@ -64,6 +64,8 @@ #ifndef __GCENV_BASE_INCLUDED__ +#include + // // This macro returns val rounded up as necessary to be a multiple of alignment; alignment must be a power of 2 // diff --git a/src/coreclr/nativeaot/Runtime/DisabledEventPipeInterface.cpp b/src/coreclr/nativeaot/Runtime/DisabledEventPipeInterface.cpp index 1195c7adc4231cb5ab468774703e2f1d81e616d0..e1227c6c46c442bf982811eb29cefa18dc964b36 100644 --- a/src/coreclr/nativeaot/Runtime/DisabledEventPipeInterface.cpp +++ b/src/coreclr/nativeaot/Runtime/DisabledEventPipeInterface.cpp @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -void EventPipeAdapter_Initialize() {} +void EventPipe_Initialize() {} -bool DiagnosticServerAdapter_Initialize() { return false; } -void DiagnosticServerAdapter_PauseForDiagnosticsMonitor() {} +bool DiagnosticServer_Initialize() { return false; } +void DiagnosticServer_PauseForDiagnosticsMonitor() {} -void EventPipeAdapter_FinishInitialize() {} +void EventPipe_FinishInitialize() {} void EventPipe_ThreadShutdown() { } -void EventPipeAdapter_Shutdown() {} -bool DiagnosticServerAdapter_Shutdown() { return false; } +void EventPipe_Shutdown() {} +bool DiagnosticServer_Shutdown() { return false; } diff --git a/src/coreclr/nativeaot/Runtime/EnabledEventPipeInterface.cpp b/src/coreclr/nativeaot/Runtime/EnabledEventPipeInterface.cpp index 0a68a15eebb38c76cb4ef12ab6703817728ad418..49fdefd2daa7ea9d701d878cf66d3658f20a6884 100644 --- a/src/coreclr/nativeaot/Runtime/EnabledEventPipeInterface.cpp +++ b/src/coreclr/nativeaot/Runtime/EnabledEventPipeInterface.cpp @@ -1,17 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#include "eventpipeadapter.h" -#include "diagnosticserveradapter.h" +#include +#include +#include -void EventPipeAdapter_Initialize() { EventPipeAdapter::Initialize(); } +void EventPipe_Initialize() { ep_init(); } -bool DiagnosticServerAdapter_Initialize() { return DiagnosticServerAdapter::Initialize(); } -void DiagnosticServerAdapter_PauseForDiagnosticsMonitor() { DiagnosticServerAdapter::PauseForDiagnosticsMonitor();} +bool DiagnosticServer_Initialize() { return ds_server_init(); } +void DiagnosticServer_PauseForDiagnosticsMonitor() { ds_server_pause_for_diagnostics_monitor(); } -void EventPipeAdapter_FinishInitialize() { EventPipeAdapter::FinishInitialize(); } +void EventPipe_FinishInitialize() { ep_finish_init(); } void EventPipe_ThreadShutdown() { ep_rt_aot_thread_exited(); } -void EventPipeAdapter_Shutdown() { EventPipeAdapter::Shutdown(); } -bool DiagnosticServerAdapter_Shutdown() { return DiagnosticServerAdapter::Shutdown(); } +void EventPipe_Shutdown() { ep_shutdown(); } +bool DiagnosticServer_Shutdown() { return ds_server_shutdown(); } diff --git a/src/coreclr/nativeaot/Runtime/EventPipeInterface.h b/src/coreclr/nativeaot/Runtime/EventPipeInterface.h index c8f2d31172d219041b4b06c772b5ba21838817ff..4ab90aa18efa43526a12fd6ad5e627da13666407 100644 --- a/src/coreclr/nativeaot/Runtime/EventPipeInterface.h +++ b/src/coreclr/nativeaot/Runtime/EventPipeInterface.h @@ -5,19 +5,18 @@ #define EVENTPIPE_INTERFACE_H // Initialize EventPipe -void EventPipeAdapter_Initialize(); +void EventPipe_Initialize(); // Initialize DS -bool DiagnosticServerAdapter_Initialize(); -void DiagnosticServerAdapter_PauseForDiagnosticsMonitor(); +bool DiagnosticServer_Initialize(); +void DiagnosticServer_PauseForDiagnosticsMonitor(); - -void EventPipeAdapter_FinishInitialize(); +void EventPipe_FinishInitialize(); void EventPipe_ThreadShutdown(); -void EventPipeAdapter_Shutdown(); -bool DiagnosticServerAdapter_Shutdown(); +void EventPipe_Shutdown(); +bool DiagnosticServer_Shutdown(); void EventTracing_Initialize(); #endif //EVENTPIPE_INTERFACE_H \ No newline at end of file diff --git a/src/coreclr/nativeaot/Runtime/PalRedhawk.h b/src/coreclr/nativeaot/Runtime/PalRedhawk.h index f12aa2e703e1097b7caa227b89ca3d9228ee40be..d15969eab3784b4cc8c740764a17ca099f721f1d 100644 --- a/src/coreclr/nativeaot/Runtime/PalRedhawk.h +++ b/src/coreclr/nativeaot/Runtime/PalRedhawk.h @@ -17,6 +17,10 @@ #include #include +#ifdef TARGET_UNIX +#include +#endif + #include "CommonTypes.h" #include "CommonMacros.h" #include "gcenv.structs.h" // CRITICAL_SECTION diff --git a/src/coreclr/nativeaot/Runtime/StackFrameIterator.h b/src/coreclr/nativeaot/Runtime/StackFrameIterator.h index 5ea7676cf51e8f634673e7ed0a4d8a98e8916593..007ca413c57ce2877c35b8000cf4df39f9103bbf 100644 --- a/src/coreclr/nativeaot/Runtime/StackFrameIterator.h +++ b/src/coreclr/nativeaot/Runtime/StackFrameIterator.h @@ -4,7 +4,12 @@ #ifndef __StackFrameIterator_h__ #define __StackFrameIterator_h__ +#include "CommonMacros.h" #include "ICodeManager.h" +#include "PalRedhawk.h" // NATIVE_CONTEXT +#include "regdisplay.h" + +#include "forward_declarations.h" struct ExInfo; typedef DPTR(ExInfo) PTR_ExInfo; @@ -22,6 +27,7 @@ struct EHEnum EHEnumState m_state; }; +class StackFrameIterator; EXTERN_C FC_BOOL_RET FASTCALL RhpSfiInit(StackFrameIterator* pThis, PAL_LIMITED_CONTEXT* pStackwalkCtx, CLR_BOOL instructionFault); EXTERN_C FC_BOOL_RET FASTCALL RhpSfiNext(StackFrameIterator* pThis, uint32_t* puExCollideClauseIdx, CLR_BOOL* pfUnwoundReversePInvoke); diff --git a/src/coreclr/nativeaot/Runtime/diagnosticserveradapter.h b/src/coreclr/nativeaot/Runtime/diagnosticserveradapter.h deleted file mode 100644 index 7a133ce9f9c15e9c50637822b95d8ebc6642edae..0000000000000000000000000000000000000000 --- a/src/coreclr/nativeaot/Runtime/diagnosticserveradapter.h +++ /dev/null @@ -1,42 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -#ifndef DIAGNOSTIC_SERVER_ADAPTER_H -#define DIAGNOSTIC_SERVER_ADAPTER_H - -#if defined(FEATURE_PERFTRACING) - -#include - -class DiagnosticServerAdapter final -{ -public: - static inline bool Initialize() - { - return ds_server_init(); - } - - static inline bool Shutdown() - { - return ds_server_shutdown(); - } - - NOINLINE static void PauseForDiagnosticsMonitor() - { - return ds_server_pause_for_diagnostics_monitor(); - } - - static void ResumeRuntimeStartup() - { - return ds_server_resume_runtime_startup(); - } - - static bool IsPausedInRuntimeStartup() - { - return ds_server_is_paused_in_startup(); - } -}; - -#endif // FEATURE_PERFTRACING - -#endif // DIAGNOSTIC_SERVER_ADAPTER_H diff --git a/src/coreclr/nativeaot/Runtime/disabledeventpipeinternal.cpp b/src/coreclr/nativeaot/Runtime/disabledeventpipeinternal.cpp index f2de93efbf035ecc3a054a5484679def63fc89a8..4f34808b1c569e39de8c7e51153094e4d998c001 100644 --- a/src/coreclr/nativeaot/Runtime/disabledeventpipeinternal.cpp +++ b/src/coreclr/nativeaot/Runtime/disabledeventpipeinternal.cpp @@ -1,23 +1,20 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#include "common.h" -#include "eventpipeadapter.h" +#include "CommonTypes.h" +#include "CommonMacros.h" +#include "PalRedhawk.h" -#ifdef FEATURE_PERFTRACING +#include -#include "gcenv.h" -#include "regdisplay.h" -#include "StackFrameIterator.h" -#include "thread.h" -#include "SpinLock.h" +#ifdef FEATURE_PERFTRACING struct EventPipeEventInstanceData; struct EventPipeSessionInfo; EXTERN_C NATIVEAOT_API uint64_t __cdecl RhEventPipeInternal_Enable( - LPCWSTR outputFile, + const WCHAR* outputFile, EventPipeSerializationFormat format, uint32_t circularBufferSizeInMB, /* COR_PRF_EVENTPIPE_PROVIDER_CONFIG */ const void * pProviders, @@ -31,7 +28,7 @@ EXTERN_C NATIVEAOT_API void __cdecl RhEventPipeInternal_Disable(uint64_t session } EXTERN_C NATIVEAOT_API intptr_t __cdecl RhEventPipeInternal_CreateProvider( - LPCWSTR providerName, + const WCHAR* providerName, EventPipeCallback pCallbackFunc, void* pCallbackContext) { @@ -50,7 +47,7 @@ EXTERN_C NATIVEAOT_API intptr_t __cdecl RhEventPipeInternal_DefineEvent( return 0; } -EXTERN_C NATIVEAOT_API intptr_t __cdecl RhEventPipeInternal_GetProvider(LPCWSTR providerName) +EXTERN_C NATIVEAOT_API intptr_t __cdecl RhEventPipeInternal_GetProvider(const WCHAR* providerName) { return 0; } diff --git a/src/coreclr/nativeaot/Runtime/disabledruntimeeventinternal.cpp b/src/coreclr/nativeaot/Runtime/disabledruntimeeventinternal.cpp index 57ef8d3604b68f99d97533e9540b2f5d14a7fac0..6b3e76f6dde1c6b13f47a15959c12414e43edfc1 100644 --- a/src/coreclr/nativeaot/Runtime/disabledruntimeeventinternal.cpp +++ b/src/coreclr/nativeaot/Runtime/disabledruntimeeventinternal.cpp @@ -1,7 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#include "eventpipeadapter.h" +#include "CommonTypes.h" +#include "CommonMacros.h" +#include "PalRedhawk.h" #ifdef FEATURE_PERFTRACING @@ -78,7 +80,7 @@ EXTERN_C NATIVEAOT_API void __cdecl NativeRuntimeEventSource_LogThreadPoolIOPack { } -EXTERN_C NATIVEAOT_API void __cdecl NativeRuntimeEventSource_LogExceptionThrown(LPCWSTR exceptionTypeName, LPCWSTR exceptionMessage, void* faultingIP, HRESULT hresult) +EXTERN_C NATIVEAOT_API void __cdecl NativeRuntimeEventSource_LogExceptionThrown(const WCHAR* exceptionTypeName, const WCHAR* exceptionMessage, void* faultingIP, HRESULT hresult) { } diff --git a/src/coreclr/nativeaot/Runtime/eventpipe/CMakeLists.txt b/src/coreclr/nativeaot/Runtime/eventpipe/CMakeLists.txt index f911edecb9c4c795e8a2580931befd1cfe254d66..ab6f781c1afbd6404d753b23edfb25dea4b51978 100644 --- a/src/coreclr/nativeaot/Runtime/eventpipe/CMakeLists.txt +++ b/src/coreclr/nativeaot/Runtime/eventpipe/CMakeLists.txt @@ -107,7 +107,6 @@ list(APPEND GEN_EVENTPIPE_SOURCES list(APPEND AOT_EVENTPIPE_MANAGED_TO_NATIVE_SOURCES ${RUNTIME_DIR}/eventpipeinternal.cpp ${RUNTIME_DIR}/eventpipeadapter.h - ${RUNTIME_DIR}/diagnosticserveradapter.h ${RUNTIME_DIR}/EnabledEventPipeInterface.cpp ${RUNTIME_DIR}/runtimeeventinternal.cpp ) diff --git a/src/coreclr/nativeaot/Runtime/eventpipe/dotnetruntime.cpp b/src/coreclr/nativeaot/Runtime/eventpipe/dotnetruntime.cpp index 0bf1eeef5206667cfe147be97ec4bdcdff5014b9..95560af0fac9a779043ebca73823a52e0bdceecb 100644 --- a/src/coreclr/nativeaot/Runtime/eventpipe/dotnetruntime.cpp +++ b/src/coreclr/nativeaot/Runtime/eventpipe/dotnetruntime.cpp @@ -6,9 +6,11 @@ // @TODO: Audit native events in NativeAOT Runtime #include -#include "eventpipeadapter.h" -#include "eventtrace_context.h" -#include "gcheaputilities.h" +#include + +#include +#include +#include #ifndef ERROR_WRITE_FAULT #define ERROR_WRITE_FAULT 29L @@ -3011,7 +3013,7 @@ void InitDotNETRuntime(void) bool DotNETRuntimeProvider_IsEnabled(unsigned char level, unsigned long long keyword) { - if (!EventPipeAdapter::Enabled()) + if (!ep_enabled()) return false; EVENTPIPE_TRACE_CONTEXT& context = MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER_DOTNET_Context.EventPipeProvider; diff --git a/src/coreclr/nativeaot/Runtime/eventpipeadapter.h b/src/coreclr/nativeaot/Runtime/eventpipeadapter.h index 9f1b67db5a89ad7eb11abb62052abebd0afb637c..b43c4be3dc7786a2385fca7ae1bb2bfee404b37c 100644 --- a/src/coreclr/nativeaot/Runtime/eventpipeadapter.h +++ b/src/coreclr/nativeaot/Runtime/eventpipeadapter.h @@ -17,28 +17,12 @@ #include #include -#include "gcenv.h" -#include "regdisplay.h" -#include "StackFrameIterator.h" -#include "thread.h" -#include "holder.h" -#include "SpinLock.h" +#include "CommonTypes.h" class EventPipeAdapter final { public: - static inline void Initialize() - { - CONTRACTL - { - NOTHROW; - } - CONTRACTL_END; - - ep_init(); - } - - static inline EventPipeProvider * CreateProvider(LPCWSTR providerName, EventPipeCallback callback, void* pCallbackContext = nullptr) + static inline EventPipeProvider * CreateProvider(const WCHAR* providerName, EventPipeCallback callback, void* pCallbackContext = nullptr) { ep_char8_t *providerNameUTF8 = ep_rt_utf16_to_utf8_string(reinterpret_cast(providerName), -1); EventPipeProvider * provider = ep_create_provider (providerNameUTF8, callback, pCallbackContext); @@ -46,66 +30,6 @@ public: return provider; } - static inline void DeleteProvider (EventPipeProvider * provider) - { - ep_delete_provider (provider); - } - - - static inline void FinishInitialize() - { - CONTRACTL - { - NOTHROW; - } - CONTRACTL_END; - - ep_finish_init(); - } - - static inline void Shutdown() - { - ep_shutdown(); - } - - static inline bool Enabled() - { - STATIC_CONTRACT_NOTHROW; - return ep_enabled(); - } - - static inline void Disable(EventPipeSessionID id) - { - CONTRACTL - { - NOTHROW; - GC_TRIGGERS; - MODE_ANY; - } - CONTRACTL_END; - - ep_disable(id); - } - - static inline EventPipeProvider * GetProvider (LPCWSTR providerName) - { - CONTRACTL - { - NOTHROW; - GC_NOTRIGGER; - MODE_ANY; - } - CONTRACTL_END; - - if (!providerName) - return NULL; - - ep_char8_t *providerNameUTF8 = ep_rt_utf16_to_utf8_string(reinterpret_cast(providerName), -1); - EventPipeProvider * provider = ep_get_provider (providerNameUTF8); - ep_rt_utf8_string_free(providerNameUTF8); - return provider; - } - static inline EventPipeEvent * AddEvent( EventPipeProvider *provider, uint32_t eventID, diff --git a/src/coreclr/nativeaot/Runtime/eventpipeinternal.cpp b/src/coreclr/nativeaot/Runtime/eventpipeinternal.cpp index 7cf502d6345eef51c1eb3cea9e4c4ddada4050ee..ca66bcab3790594a83c163547e33f2c07e61b959 100644 --- a/src/coreclr/nativeaot/Runtime/eventpipeinternal.cpp +++ b/src/coreclr/nativeaot/Runtime/eventpipeinternal.cpp @@ -3,12 +3,7 @@ #include "common.h" #include "eventpipeadapter.h" - -#include "gcenv.h" -#include "regdisplay.h" -#include "StackFrameIterator.h" -#include "thread.h" -#include "SpinLock.h" +#include "PalRedhawk.h" #ifdef FEATURE_PERFTRACING @@ -17,7 +12,7 @@ struct EventPipeEventInstanceData void *ProviderID; unsigned int EventID; unsigned int ThreadID; - LARGE_INTEGER TimeStamp; + int64_t TimeStamp; GUID ActivityId; GUID RelatedActivityId; const uint8_t *Payload; @@ -40,7 +35,7 @@ struct EventPipeProviderConfigurationNative }; EXTERN_C NATIVEAOT_API uint64_t __cdecl RhEventPipeInternal_Enable( - LPCWSTR outputFile, + const WCHAR* outputFile, EventPipeSerializationFormat format, uint32_t circularBufferSizeInMB, /* COR_PRF_EVENTPIPE_PROVIDER_CONFIG */ const void * pProviders, @@ -102,11 +97,11 @@ EXTERN_C NATIVEAOT_API uint64_t __cdecl RhEventPipeInternal_Enable( EXTERN_C NATIVEAOT_API void __cdecl RhEventPipeInternal_Disable(uint64_t sessionID) { - EventPipeAdapter::Disable(sessionID); + ep_disable(sessionID); } EXTERN_C NATIVEAOT_API intptr_t __cdecl RhEventPipeInternal_CreateProvider( - LPCWSTR providerName, + const WCHAR* providerName, EventPipeCallback pCallbackFunc, void* pCallbackContext) { @@ -133,10 +128,17 @@ EXTERN_C NATIVEAOT_API intptr_t __cdecl RhEventPipeInternal_DefineEvent( return reinterpret_cast(pEvent); } -EXTERN_C NATIVEAOT_API intptr_t __cdecl RhEventPipeInternal_GetProvider(LPCWSTR providerName) +EXTERN_C NATIVEAOT_API intptr_t __cdecl RhEventPipeInternal_GetProvider(const WCHAR* providerName) { - EventPipeProvider* pProvider = EventPipeAdapter::GetProvider(providerName); - return reinterpret_cast(pProvider); + EventPipeProvider * provider = NULL; + if (providerName) + { + ep_char8_t *providerNameUTF8 = ep_rt_utf16_to_utf8_string(reinterpret_cast(providerName), -1); + provider = ep_get_provider (providerNameUTF8); + ep_rt_utf8_string_free(providerNameUTF8); + } + + return reinterpret_cast(provider); } EXTERN_C NATIVEAOT_API void __cdecl RhEventPipeInternal_DeleteProvider(intptr_t provHandle) @@ -144,7 +146,7 @@ EXTERN_C NATIVEAOT_API void __cdecl RhEventPipeInternal_DeleteProvider(intptr_t if (provHandle != 0) { EventPipeProvider *pProvider = reinterpret_cast(provHandle); - EventPipeAdapter::DeleteProvider(pProvider); + ep_delete_provider(pProvider); } } @@ -251,7 +253,7 @@ EXTERN_C NATIVEAOT_API UInt32_BOOL __cdecl RhEventPipeInternal_GetNextEvent(uint pInstance->ProviderID = ep_event_get_provider(ep_event_instance_get_ep_event(pNextInstance)); pInstance->EventID = ep_event_get_event_id(ep_event_instance_get_ep_event(pNextInstance)); pInstance->ThreadID = static_cast(ep_event_get_event_id(ep_event_instance_get_ep_event(pNextInstance))); - pInstance->TimeStamp.QuadPart = ep_event_instance_get_timestamp(pNextInstance); + pInstance->TimeStamp = ep_event_instance_get_timestamp(pNextInstance); pInstance->ActivityId = *reinterpret_cast(ep_event_instance_get_activity_id_cref(pNextInstance)); pInstance->RelatedActivityId = *reinterpret_cast(ep_event_instance_get_related_activity_id_cref(pNextInstance)); pInstance->Payload = ep_event_instance_get_data(pNextInstance); @@ -267,7 +269,7 @@ EXTERN_C NATIVEAOT_API UInt32_BOOL __cdecl RhEventPipeInternal_SignalSession(uin if (!session) return false; - return ep_rt_wait_event_set (ep_session_get_wait_event (session)); + return ep_rt_wait_event_set (ep_session_get_wait_event (session)); } EXTERN_C NATIVEAOT_API UInt32_BOOL __cdecl RhEventPipeInternal_WaitForSessionSignal(uint64_t sessionID, int32_t timeoutMs) diff --git a/src/coreclr/nativeaot/Runtime/gcenv.h b/src/coreclr/nativeaot/Runtime/gcenv.h index ad01f7f0611331b7e3abfdfec1de45224466f989..cf9e5ade93b3892207520be6cb119c1180ea1c9a 100644 --- a/src/coreclr/nativeaot/Runtime/gcenv.h +++ b/src/coreclr/nativeaot/Runtime/gcenv.h @@ -14,6 +14,11 @@ #include #include +#ifdef TARGET_UNIX +#include +#endif + +#include "rhassert.h" #include "sal.h" #include "gcenv.structs.h" #include "gcenv.interlocked.h" diff --git a/src/coreclr/nativeaot/Runtime/inc/TargetPtrs.h b/src/coreclr/nativeaot/Runtime/inc/TargetPtrs.h index e4778f94db18f971f27af4282f5dcdf17872b720..0ef7f5e8a84f724aad3052bd514d2e2ff8e5dc6b 100644 --- a/src/coreclr/nativeaot/Runtime/inc/TargetPtrs.h +++ b/src/coreclr/nativeaot/Runtime/inc/TargetPtrs.h @@ -3,8 +3,6 @@ #ifndef _TARGETPTRS_H_ #define _TARGETPTRS_H_ -typedef DPTR(class MethodTable) PTR_EEType; - #ifdef TARGET_AMD64 typedef uint64_t UIntTarget; #elif defined(TARGET_X86) @@ -19,11 +17,7 @@ typedef uint32_t UIntTarget; #error unexpected target architecture #endif -typedef PTR_UInt8 TgtPTR_UInt8; -typedef PTR_UInt32 TgtPTR_UInt32; typedef void * TgtPTR_Void; -typedef PTR_EEType TgtPTR_EEType; typedef class Thread * TgtPTR_Thread; -typedef struct CORINFO_Object * TgtPTR_CORINFO_Object; #endif // !_TARGETPTRS_H_ diff --git a/src/coreclr/nativeaot/Runtime/inc/rhbinder.h b/src/coreclr/nativeaot/Runtime/inc/rhbinder.h index 4372c5ce1922a1605f831c0ef1e0a639e340c737..5d7040d70eafe496b29149931fb0753afe9a97be 100644 --- a/src/coreclr/nativeaot/Runtime/inc/rhbinder.h +++ b/src/coreclr/nativeaot/Runtime/inc/rhbinder.h @@ -6,6 +6,7 @@ // // This header contains binder-generated data structures that the runtime consumes. // +#include "daccess.h" // DPTR #include "TargetPtrs.h" class MethodTable; diff --git a/src/coreclr/nativeaot/Runtime/regdisplay.h b/src/coreclr/nativeaot/Runtime/regdisplay.h index 90a0250d045f617b4ee3ecc1597a1b80eab4253c..eae75eabe2e6c430d8edc604350a976024f2f4c6 100644 --- a/src/coreclr/nativeaot/Runtime/regdisplay.h +++ b/src/coreclr/nativeaot/Runtime/regdisplay.h @@ -6,6 +6,8 @@ #if defined(TARGET_X86) || defined(TARGET_AMD64) +#include "PalRedhawkCommon.h" // Fp128 + struct REGDISPLAY { PTR_UIntNative pRax; diff --git a/src/coreclr/nativeaot/Runtime/runtimeeventinternal.cpp b/src/coreclr/nativeaot/Runtime/runtimeeventinternal.cpp index eebe490f3e0b6259c05a89ae7f416f66cbc52427..b346ef52d3351c5ffb7d5fe75fd45c6d69d97459 100644 --- a/src/coreclr/nativeaot/Runtime/runtimeeventinternal.cpp +++ b/src/coreclr/nativeaot/Runtime/runtimeeventinternal.cpp @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#include "eventpipeadapter.h" +#include "gcenv.h" #ifdef FEATURE_PERFTRACING @@ -90,7 +90,7 @@ EXTERN_C NATIVEAOT_API void __cdecl NativeRuntimeEventSource_LogThreadPoolIOPack FireEtwThreadPoolIOPack(NativeOverlapped, Overlapped, ClrInstanceID); } -EXTERN_C NATIVEAOT_API void __cdecl NativeRuntimeEventSource_LogExceptionThrown(LPCWSTR exceptionTypeName, LPCWSTR exceptionMessage, void* faultingIP, HRESULT hresult) +EXTERN_C NATIVEAOT_API void __cdecl NativeRuntimeEventSource_LogExceptionThrown(const WCHAR* exceptionTypeName, const WCHAR* exceptionMessage, void* faultingIP, HRESULT hresult) { FireEtwExceptionThrown_V1(exceptionTypeName, exceptionMessage, diff --git a/src/coreclr/nativeaot/Runtime/startup.cpp b/src/coreclr/nativeaot/Runtime/startup.cpp index 272dd8e4890595a203f771dca4564d3e4dc88cc5..32cbab53cb8304c16cc448e66187b5026831f110 100644 --- a/src/coreclr/nativeaot/Runtime/startup.cpp +++ b/src/coreclr/nativeaot/Runtime/startup.cpp @@ -100,10 +100,10 @@ static bool InitDLL(HANDLE hPalInstance) #ifdef FEATURE_PERFTRACING // Initialize EventPipe - EventPipeAdapter_Initialize(); + EventPipe_Initialize(); // Initialize DS - DiagnosticServerAdapter_Initialize(); - DiagnosticServerAdapter_PauseForDiagnosticsMonitor(); + DiagnosticServer_Initialize(); + DiagnosticServer_PauseForDiagnosticsMonitor(); #endif #ifdef FEATURE_EVENT_TRACE EventTracing_Initialize(); @@ -157,7 +157,7 @@ static bool InitDLL(HANDLE hPalInstance) // Finish setting up rest of EventPipe - specifically enable SampleProfiler if it was requested at startup. // SampleProfiler needs to cooperate with the GC which hasn't fully finished setting up in the first part of the // EventPipe initialization, so this is done after the GC has been fully initialized. - EventPipeAdapter_FinishInitialize(); + EventPipe_FinishInitialize(); #endif #ifndef USE_PORTABLE_HELPERS @@ -309,8 +309,8 @@ static void __cdecl OnProcessExit() #endif #ifdef FEATURE_PERFTRACING - EventPipeAdapter_Shutdown(); - DiagnosticServerAdapter_Shutdown(); + EventPipe_Shutdown(); + DiagnosticServer_Shutdown(); #endif } @@ -342,7 +342,7 @@ void RuntimeThreadShutdown(void* thread) #endif ThreadStore::DetachCurrentThread(); - + #ifdef FEATURE_PERFTRACING EventPipe_ThreadShutdown(); #endif diff --git a/src/coreclr/nativeaot/Runtime/thread.h b/src/coreclr/nativeaot/Runtime/thread.h index 39310955e388cf271b86598c9fc205d0efb2885b..1213c3e16ce03bff6f35975580cdc66dd605a171 100644 --- a/src/coreclr/nativeaot/Runtime/thread.h +++ b/src/coreclr/nativeaot/Runtime/thread.h @@ -4,10 +4,8 @@ #ifndef __thread_h__ #define __thread_h__ -#include "regdisplay.h" #include "StackFrameIterator.h" - -#include "forward_declarations.h" +#include "slist.h" // DefaultSListTraits struct gc_alloc_context; class RuntimeInstance;