Initial work to port EventPipe library to NativeAOT (#80382)
authorLakshan Fernando <lakshanf@hotmail.com>
Wed, 8 Feb 2023 15:55:57 +0000 (07:55 -0800)
committerGitHub <noreply@github.com>
Wed, 8 Feb 2023 15:55:57 +0000 (07:55 -0800)
commit081d93a5e8817d47e660a38404c08364c286172f
tree641d61956656c1719520016035f2ea75cfcb5431
parent5b2ceeb8c240f8c6248ff9bee1b696014004a7af
Initial work to port EventPipe library to NativeAOT (#80382)

* CoreCLR shim files renamed to AOT

* change coreclr references to aot

* Native AOT runtime implementation

* hooks to EP library from AOT

* Container code

* Maanged to Native hooks

* build artifacts

* required changes to NativeAOT to support EP

* changes to common EP source

* sample EventSource test app

* Add EventPipe lib to the linker

* Additional conditions to include the EventPipe library

* Fixing the Checked and Release and Linux builds

* separating maanged and native EventSource switches

* Update src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets

Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
* FB, build break and test fixes

* fix non-windows build breaks and using paldebugbreak for TODOs

* trying another option to get arounf inttypes.h and PRIu64

* reverting the changes in ep-json file in common code

* Add an NativeAOT EventSource test

* FB and only enabling FEATURE_PERFTRACING in Windows

* fix DiagnosticEventSource test

* FB

* Update src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Windows.targets

Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
* Added GuardCF version and a standalone test

* Moving NativeAOT headers away from EventPipe common code

* fix linux build break

* missed a needed definition in Linux

* inline eventpipe common source code

* Adding Evenpipe lib to a lib test

* Small cleanups

* Undo unnecessary changes
* Make sure runtime can build without FEATURE_PERFTRACING

* Fix linux build

---------

Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
39 files changed:
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Windows.targets
src/coreclr/nativeaot/Directory.Build.props
src/coreclr/nativeaot/Runtime/CMakeLists.txt
src/coreclr/nativeaot/Runtime/DisabledEventPipeInterface.cpp [new file with mode: 0644]
src/coreclr/nativeaot/Runtime/EmptyContainers.h [new file with mode: 0644]
src/coreclr/nativeaot/Runtime/EmptyContainers2.h [new file with mode: 0644]
src/coreclr/nativeaot/Runtime/EnabledEventPipeInterface.cpp [new file with mode: 0644]
src/coreclr/nativeaot/Runtime/EventPipeInterface.h [new file with mode: 0644]
src/coreclr/nativeaot/Runtime/PalRedhawk.h
src/coreclr/nativeaot/Runtime/diagnosticserveradapter.h [new file with mode: 0644]
src/coreclr/nativeaot/Runtime/disabledeventpipeinternal.cpp [new file with mode: 0644]
src/coreclr/nativeaot/Runtime/eventpipe/CMakeLists.txt [new file with mode: 0644]
src/coreclr/nativeaot/Runtime/eventpipe/NativeaotEventPipeSupport.h [new file with mode: 0644]
src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.h [new file with mode: 0644]
src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-types-aot.h [new file with mode: 0644]
src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.cpp [new file with mode: 0644]
src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.h [new file with mode: 0644]
src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-config-aot.h [new file with mode: 0644]
src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-types-aot.h [new file with mode: 0644]
src/coreclr/nativeaot/Runtime/eventpipeadapter.h [new file with mode: 0644]
src/coreclr/nativeaot/Runtime/eventpipeadaptertypes.h [new file with mode: 0644]
src/coreclr/nativeaot/Runtime/eventpipeinternal.cpp [new file with mode: 0644]
src/coreclr/nativeaot/Runtime/startup.cpp
src/coreclr/nativeaot/Runtime/thread.h
src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp
src/coreclr/nativeaot/Runtime/windows/PalRedhawkMinWin.cpp
src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Diagnostics/Eventing/EventPipe.NativeAot.cs [new file with mode: 0644]
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs
src/coreclr/tools/aot/ILCompiler/reproNative/reproNative.vcxproj
src/libraries/Microsoft.Extensions.Logging.EventSource/tests/Microsoft.Extensions.Logging.EventSource.Tests.csproj
src/libraries/System.Diagnostics.DiagnosticSource/tests/NativeAotTests/System.Diagnostics.DiagnosticSource.NativeAotTests.proj
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/RuntimeEventSource.cs
src/libraries/System.Private.CoreLib/src/System/Threading/Overlapped.cs
src/native/eventpipe/ep-rt-config.h
src/tests/tracing/eventpipe/common/IpcTraceTest.cs
src/tests/tracing/eventpipe/simpleprovidervalidation/simpleprovidervalidation.cs [new file with mode: 0644]
src/tests/tracing/eventpipe/simpleprovidervalidation/simpleprovidervalidation.csproj [new file with mode: 0644]