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

Initial work to port EventPipe library to NativeAOT #80382

Merged
merged 34 commits into from
Feb 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
cc5971f
CoreCLR shim files renamed to AOT
LakshanF Jan 9, 2023
9cf5f08
change coreclr references to aot
LakshanF Jan 9, 2023
ac16e8e
Native AOT runtime implementation
LakshanF Jan 9, 2023
418f8c3
hooks to EP library from AOT
LakshanF Jan 9, 2023
179585e
Container code
LakshanF Jan 9, 2023
8502406
Maanged to Native hooks
LakshanF Jan 9, 2023
a4ee746
build artifacts
LakshanF Jan 9, 2023
fe8252c
required changes to NativeAOT to support EP
LakshanF Jan 9, 2023
4b9e103
changes to common EP source
LakshanF Jan 9, 2023
548e8d7
sample EventSource test app
LakshanF Jan 9, 2023
1a742b0
Add EventPipe lib to the linker
LakshanF Jan 11, 2023
a03fcb1
Additional conditions to include the EventPipe library
LakshanF Jan 12, 2023
b36a06c
Fixing the Checked and Release and Linux builds
LakshanF Jan 12, 2023
c724e36
Merge branch 'main' into ExperimentEventPipe3
LakshanF Jan 13, 2023
b152648
separating maanged and native EventSource switches
LakshanF Jan 14, 2023
28e5439
Update src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Nativ…
LakshanF Jan 18, 2023
fc77cb9
FB, build break and test fixes
LakshanF Jan 19, 2023
f2002f6
fix non-windows build breaks and using paldebugbreak for TODOs
LakshanF Jan 19, 2023
5b3037e
trying another option to get arounf inttypes.h and PRIu64
LakshanF Jan 19, 2023
602f27b
reverting the changes in ep-json file in common code
LakshanF Jan 20, 2023
d8b5b98
Add an NativeAOT EventSource test
LakshanF Jan 22, 2023
93b0e9d
FB and only enabling FEATURE_PERFTRACING in Windows
LakshanF Jan 24, 2023
31535fe
fix DiagnosticEventSource test
LakshanF Jan 26, 2023
cdf37d4
FB
LakshanF Jan 29, 2023
9b17dd2
Update src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Nativ…
LakshanF Jan 30, 2023
34a44c4
Added GuardCF version and a standalone test
LakshanF Jan 31, 2023
f9b008d
Merge branch 'main' into ExperimentEventPipe3
LakshanF Jan 31, 2023
c55e32f
Moving NativeAOT headers away from EventPipe common code
LakshanF Feb 2, 2023
e4109a2
fix linux build break
LakshanF Feb 2, 2023
4bb2a7a
missed a needed definition in Linux
LakshanF Feb 2, 2023
3419c63
inline eventpipe common source code
LakshanF Feb 6, 2023
97dfa12
Adding Evenpipe lib to a lib test
LakshanF Feb 7, 2023
c10ec13
Small cleanups
MichalStrehovsky Feb 8, 2023
1cd0dc5
Fix linux build
MichalStrehovsky Feb 8, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,17 @@ The .NET Foundation licenses this file to you under the MIT license.

<IlcRPath Condition="'$(IlcRPath)' == '' and '$(TargetOS)' != 'osx'">$ORIGIN</IlcRPath>
<IlcRPath Condition="'$(IlcRPath)' == '' and '$(TargetOS)' == 'osx'">@executable_path</IlcRPath>

<EventPipeName>libeventpipe-disabled</EventPipeName>
<EventPipeName Condition="'$(EnableNativeEventPipe)' == 'true'">libeventpipe-enabled</EventPipeName>
</PropertyGroup>

<ItemGroup>
<NativeLibrary Condition="'$(IlcMultiModule)' == 'true'" Include="$(SharedLibrary)" />
<NativeLibrary Condition="'$(NativeLib)' == ''" Include="$(IlcSdkPath)libbootstrapper.a" />
<NativeLibrary Condition="'$(NativeLib)' != ''" Include="$(IlcSdkPath)libbootstrapperdll.a" />
<NativeLibrary Include="$(IlcSdkPath)$(FullRuntimeName).a" />
<NativeLibrary Include="$(IlcSdkPath)$(EventPipeName)$(LibFileExt)" />
<NativeLibrary Condition="'$(LinkStandardCPlusPlusLibrary)' != 'true' and '$(StaticICULinking)' != 'true'" Include="$(IlcSdkPath)libstdc++compat.a" />
<NativeLibrary Condition="'$(StaticNumaLinking)' == 'true'" Include="$(IlcSdkPath)libnumasupportstatic.a" />
<NativeLibrary Condition="'$(StaticNumaLinking)' != 'true'" Include="$(IlcSdkPath)libnumasupportdynamic.a" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ The .NET Foundation licenses this file to you under the MIT license.
<EntryPointSymbol Condition="'$(EntryPointSymbol)' == ''">wmainCRTStartup</EntryPointSymbol>
<LinkerSubsystem Condition="'$(OutputType)' == 'WinExe' and '$(LinkerSubsystem)' == ''">WINDOWS</LinkerSubsystem>
<LinkerSubsystem Condition="'$(OutputType)' == 'Exe' and '$(LinkerSubsystem)' == ''">CONSOLE</LinkerSubsystem>
<EventPipeName>eventpipe-disabled</EventPipeName>
<EventPipeName Condition="'$(EnableNativeEventPipe)' == 'true'">eventpipe-enabled</EventPipeName>
</PropertyGroup>

<!-- Ensure that runtime-specific paths have already been set -->
Expand All @@ -33,6 +35,7 @@ The .NET Foundation licenses this file to you under the MIT license.
<ItemGroup>
<NativeLibrary Include="$(IlcSdkPath)$(BootstrapperName)$(LibrarySuffix)" />
<NativeLibrary Include="$(IlcSdkPath)$(FullRuntimeName)$(LibrarySuffix)" />
<NativeLibrary Include="$(IlcSdkPath)$(EventPipeName)$(LibrarySuffix)" />
<NativeLibrary Condition="'$(IlcMultiModule)' == 'true'" Include="$(SharedLibrary)" />
</ItemGroup>

Expand Down
8 changes: 8 additions & 0 deletions src/coreclr/nativeaot/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@
<PropertyGroup>
<DefineConstants Condition="'$(FeatureObjCMarshal)' == 'true'">FEATURE_OBJCMARSHAL;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<FeaturePerfTracing>false</FeaturePerfTracing>
<FeaturePerfTracing Condition="'$(TargetsWindows)' == 'true'">true</FeaturePerfTracing>
</PropertyGroup>
<PropertyGroup>
<DefineConstants Condition="'$(FeaturePerfTracing)' == 'true'">FEATURE_PERFTRACING;$(DefineConstants)</DefineConstants>
</PropertyGroup>


<!-- Platform specific properties -->
<PropertyGroup Condition="'$(Platform)' == 'x64'">
Expand Down
12 changes: 12 additions & 0 deletions src/coreclr/nativeaot/Runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,14 @@ list(APPEND RUNTIME_SOURCES_ARCH_ASM
convert_to_absolute_path(ARCH_SOURCES_DIR ${ARCH_SOURCES_DIR})
include_directories(${ARCH_SOURCES_DIR})

if(NOT CLR_CMAKE_TARGET_ARCH_WASM)
set(FEATURE_PERFTRACING 1)
endif()

if(FEATURE_PERFTRACING)
add_definitions(-DFEATURE_PERFTRACING)
endif()

add_definitions(-DFEATURE_BASICFREEZE)
add_definitions(-DFEATURE_CONSERVATIVE_GC)
add_definitions(-DFEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP)
Expand Down Expand Up @@ -263,6 +271,10 @@ else()
add_subdirectory(Portable)
endif()

if(FEATURE_PERFTRACING)
add_subdirectory(eventpipe)
endif()

if (CLR_CMAKE_TARGET_UNIX)
add_library(numasupportdynamic STATIC ${GC_DIR}/unix/numasupport.dynamic.cpp)
install_static_library(numasupportdynamic aotsdk nativeaot)
Expand Down
12 changes: 12 additions & 0 deletions src/coreclr/nativeaot/Runtime/DisabledEventPipeInterface.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// 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() {}

bool DiagnosticServerAdapter_Initialize() { return false; }
void DiagnosticServerAdapter_PauseForDiagnosticsMonitor() {}

void EventPipeAdapter_FinishInitialize() {}

void EventPipeAdapter_Shutdown() {}
bool DiagnosticServerAdapter_Shutdown() { return false; }
Loading