Allow rejit on attach (dotnet/coreclr#19054)
authorDavid Mason <davmason@microsoft.com>
Wed, 1 Aug 2018 23:53:33 +0000 (16:53 -0700)
committerGitHub <noreply@github.com>
Wed, 1 Aug 2018 23:53:33 +0000 (16:53 -0700)
commit1306d91db5ee6c60889304eb8957ea9637733e91
tree02359d65a1d8b5ab4bd6682a8ee95774e3d40320
parent3c486a5aca935a55315af82e140f3ee5754e990a
Allow rejit on attach (dotnet/coreclr#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

Commit migrated from https://github.com/dotnet/coreclr/commit/1487fa7156bfc5d3ff8def0de672003ada3ff216
14 files changed:
src/coreclr/src/debug/ee/debugger.cpp
src/coreclr/src/inc/clrconfigvalues.h
src/coreclr/src/inc/corprof.idl
src/coreclr/src/pal/prebuilt/inc/corprof.h
src/coreclr/src/vm/codeman.cpp
src/coreclr/src/vm/codeversion.cpp
src/coreclr/src/vm/codeversion.h
src/coreclr/src/vm/eetoprofinterfaceimpl.cpp
src/coreclr/src/vm/eetoprofinterfaceimpl.h
src/coreclr/src/vm/eetoprofinterfaceimpl.inl
src/coreclr/src/vm/jitinterface.cpp
src/coreclr/src/vm/proftoeeinterfaceimpl.cpp
src/coreclr/src/vm/rejit.cpp
src/coreclr/src/vm/rejit.inl