Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Ayers <andya@microsoft.com>2020-05-27 02:26:53 +0300
committerGitHub <noreply@github.com>2020-05-27 02:26:53 +0300
commitf987b3bc8f8a4d49ca1fc8821a48a7614dfee7cd (patch)
treed2e0998edf88d52f8e404626f95cef1593e4a581 /src/coreclr/clrdefinitions.cmake
parente1c7d5f8838b8ebbe776dc586cd499c0761ffba9 (diff)
Simple sideloaded profile guided optimization support (#36887)
1. Add code so the runtime can read profile data from a text file and then make this data available to the jit, so it will be easier to test the jit's behavior when profile data is available. 2. Add code so the runtime can create profile text files by telling the jit to insert probes into jitted code that write into a persistent buffer, which is saved to text at shutdown. This is mainly intended to make creation of the sideloaded profile data files easier, since their internal structure must exactly match artifacts from jitted methods. 3. Add a mode where jit-instrumented Tier0 code can feed counts into Tier1 jitting. This is an experiment to see what benefit, if any, might accrue from having profile data available for Tier1 jitting. External format is text so it can be edited by hand or checked into the repo alongside tests. Binary format would be more compact but opaque. In all cases the jit internally sees a profile buffer identical to the one it sees with IBC; the only minor changes in the jit are to initialize the count field of each probe entry to zero and to only emit the entry helper call for prejitted IBC. Only root methods are instrumented, and only root method blocks are given profile weights. Broadening to handle inlinees is future work, facilitated by the new capabilites added here.
Diffstat (limited to 'src/coreclr/clrdefinitions.cmake')
-rw-r--r--src/coreclr/clrdefinitions.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/coreclr/clrdefinitions.cmake b/src/coreclr/clrdefinitions.cmake
index aa071ea69fe..469e0090271 100644
--- a/src/coreclr/clrdefinitions.cmake
+++ b/src/coreclr/clrdefinitions.cmake
@@ -195,6 +195,7 @@ add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>>:F
if (CLR_CMAKE_TARGET_ARCH_AMD64)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>>:FEATURE_ON_STACK_REPLACEMENT>)
endif (CLR_CMAKE_TARGET_ARCH_AMD64)
+add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>>:FEATURE_PGO>)
if (CLR_CMAKE_TARGET_WIN32)
add_definitions(-DFEATURE_TYPEEQUIVALENCE)
endif(CLR_CMAKE_TARGET_WIN32)