Skip to content

Commit

Permalink
Switch macOS task mechanism back to ASM (JuliaLang#39679)
Browse files Browse the repository at this point in the history
5327824 rearranged the ifdefs here and
switched macOS to unwind based switching, which is somewhat slower. That was
deemed acceptable at the time, because it work around some GDB misbehavior
in setjmp. However, we're about to update to the LLVM libunwind fork, which
appears to be even slower here, so switch back to ASM to avoid that performance
regression.
  • Loading branch information
Keno authored and ElOceanografo committed May 4, 2021
1 parent 73f9f07 commit ff24cc6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/julia_threads.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ typedef win32_ucontext_t jl_ucontext_t;
defined(_CPU_ARM_) || defined(_CPU_PPC64_))
#define JL_HAVE_ASM
#endif
#if defined(_OS_DARWIN_)
#define JL_HAVE_UNW_CONTEXT
#if 0
// very slow, but more debugging
//#elif defined(_OS_DARWIN_)
//#define JL_HAVE_UNW_CONTEXT
//#elif defined(_OS_LINUX_)
//#define JL_HAVE_UNW_CONTEXT // very slow, but more debugging
//#define JL_HAVE_UNW_CONTEXT
#elif defined(_OS_EMSCRIPTEN_)
#define JL_HAVE_ASYNCIFY
#elif !defined(JL_HAVE_ASM)
Expand Down

0 comments on commit ff24cc6

Please sign in to comment.