Don't update listeners / instrumentation levels when shutting down
When a plugin is unloaded, JVMTI unregisters listeners and updates
instrumentation level to remove any instrumentation added for jvmti.
However when we unload the plugin as a part of runtime shutdown it
is not always safe to update instrumentation level or update runtime
callbacks. Several of these require a GC critical section and a suspend
all scope. When we are unloading a plugin due to a shutdown GC has
already stopped and requesting a GC critical section is unsafe. So this
CL just returns early if we are unloading the plugin as a part of the
shutdown.
Test: art/test.py
Change-Id: Ieb4d57926ab007776e9110da5f3fd4ae518186d4
1 file changed