Skip to content

Commit

Permalink
Improvements to JITLink
Browse files Browse the repository at this point in the history
Seeing what this will look like, since it has a number of features
(delayed compilation, concurrent compilation) that are starting to
become important, so it would be nice to switch to only supporting one
common implementation of memory management.

Refs #50248

I am expecting llvm/llvm-project#63236 may
cause some problems, since we reconfigured some CI machines to minimize
that issue, but it is still likely relevant.
  • Loading branch information
vtjnash committed Oct 4, 2024
1 parent 636a35d commit a8d7b68
Show file tree
Hide file tree
Showing 3 changed files with 174 additions and 155 deletions.
14 changes: 5 additions & 9 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10396,7 +10396,7 @@ static void init_jit_functions(void)
}

#ifdef JL_USE_INTEL_JITEVENTS
char jl_using_intel_jitevents; // Non-zero if running under Intel VTune Amplifier
char jl_using_intel_jitevents = 0; // Non-zero if running under Intel VTune Amplifier
#endif

#ifdef JL_USE_OPROFILE_JITEVENTS
Expand Down Expand Up @@ -10510,9 +10510,6 @@ extern "C" void jl_init_llvm(void)
#if defined(JL_USE_INTEL_JITEVENTS) || \
defined(JL_USE_OPROFILE_JITEVENTS) || \
defined(JL_USE_PERF_JITEVENTS)
#ifdef JL_USE_JITLINK
#pragma message("JIT profiling support (JL_USE_*_JITEVENTS) not yet available on platforms that use JITLink")
#else
const char *jit_profiling = getenv("ENABLE_JITPROFILING");

#if defined(JL_USE_INTEL_JITEVENTS)
Expand All @@ -10529,24 +10526,23 @@ extern "C" void jl_init_llvm(void)

#if defined(JL_USE_PERF_JITEVENTS)
if (jit_profiling && atoi(jit_profiling)) {
jl_using_perf_jitevents= 1;
jl_using_perf_jitevents = 1;
}
#endif

#ifdef JL_USE_INTEL_JITEVENTS
if (jl_using_intel_jitevents)
jl_ExecutionEngine->RegisterJITEventListener(JITEventListener::createIntelJITEventListener());
jl_ExecutionEngine->enableIntelJITEventListener();
#endif

#ifdef JL_USE_OPROFILE_JITEVENTS
if (jl_using_oprofile_jitevents)
jl_ExecutionEngine->RegisterJITEventListener(JITEventListener::createOProfileJITEventListener());
jl_ExecutionEngine->enableOProfileJITEventListener();
#endif

#ifdef JL_USE_PERF_JITEVENTS
if (jl_using_perf_jitevents)
jl_ExecutionEngine->RegisterJITEventListener(JITEventListener::createPerfJITEventListener());
#endif
jl_ExecutionEngine->enablePerfJITEventListener();
#endif
#endif

Expand Down
Loading

0 comments on commit a8d7b68

Please sign in to comment.