Make sure all runtime threads are in the System thread group.
We want to be sure that one can suspend every thread in the 'main'
ThreadGroup without affecting the ability of the runtime to perform
normal actions. Previously the jit thread-pool created threads in the
'main' thread group. Since some debugger actions can wait until all
jit threads are in a known good state, pausing all threads in the main
thread-group can cause deadlocks. To fix this we make the ThreadPool
create all threads in the system thread-group.
To test this we perform structural redefinition with all threads
except the main one suspended. Previously this would deadlock if run
with --jit, as we will pause the jit before performing redefinition.
Test: ./test.py --host --jit
Test: ./test.py --host
Bug: 146178357
Change-Id: Ifcb0f29613d2fc22ca7913d4868a1e425b0bee5b
11 files changed