From 1487fa7156bfc5d3ff8def0de672003ada3ff216 Mon Sep 17 00:00:00 2001 From: David Mason Date: Wed, 1 Aug 2018 16:53:33 -0700 Subject: Allow rejit on attach (#19054) * change profiler rejit to be enabled by default, and also change the debugger to only give up on setting a breakpoint if a method has been rejitted, rather than just whenever rejit is on * copy corprof changes to the pal version, and change rejit so it is allowable on attach * Change GetILFunctionBody/SetILFunctionBody to be allowed after attach * Also make RequestRevert allowable on attach * change lock order and switch from GC_NOTRIGGER to GC_TRIGGERS in Rejit codepath through the codeversionmanager * make GetReJITIDs callable after attach * change profiler rejit to be enabled by default, and also change the debugger to only give up on setting a breakpoint if a method has been rejitted, rather than just whenever rejit is on * copy corprof changes to the pal version, and change rejit so it is allowable on attach * Change GetILFunctionBody/SetILFunctionBody to be allowed after attach * Also make RequestRevert allowable on attach * change lock order and switch from GC_NOTRIGGER to GC_TRIGGERS in Rejit codepath through the codeversionmanager * make GetReJITIDs callable after attach * rename value to enable/disable rejit on attach, and cache values of profiler rejit and config value * Change places where the jit checks for rejit being enabled to actually check for what it wants, which is whether jump stamps are enabled * get rid of old value that was readded by merge somehow * disallow detach after setting rejit event mask, and prevent it from being set if rejit on attach is turned off * fix incorrect assert * Take the codemanager lock in SetIP --- src/vm/jitinterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vm/jitinterface.cpp') diff --git a/src/vm/jitinterface.cpp b/src/vm/jitinterface.cpp index 42cbc010b6..2c37d4ae63 100644 --- a/src/vm/jitinterface.cpp +++ b/src/vm/jitinterface.cpp @@ -12398,7 +12398,7 @@ CorJitResult CallCompileMethodWithSEHWrapper(EEJitManager *jitMgr, flags.Set(CORJIT_FLAGS::CORJIT_FLAG_FRAMED); if (g_pConfig->JitAlignLoops()) flags.Set(CORJIT_FLAGS::CORJIT_FLAG_ALIGN_LOOPS); - if (ReJitManager::IsReJITEnabled() || g_pConfig->AddRejitNops()) + if (ftn->IsVersionableWithJumpStamp() || g_pConfig->AddRejitNops()) flags.Set(CORJIT_FLAGS::CORJIT_FLAG_PROF_REJIT_NOPS); #ifdef _TARGET_X86_ if (g_pConfig->PInvokeRestoreEsp(ftn->GetModule()->IsPreV4Assembly())) -- cgit v1.2.3