ART: Fix GetThreadInfo
Fix the retrieval of the context classloader. Make sure to have
the field from the Thread class, don't look into a subclass.
Add caching for the field. Also fix the usage restriction of the
function, which is only valid during the Live phase.
Bug: 36654185
Test: ./test.py --host -r -t 924
Change-Id: I5cce41b31c32e59c80bb7c3afa03e8b0975ec54e
diff --git a/runtime/openjdkjvmti/ti_phase.h b/runtime/openjdkjvmti/ti_phase.h
index 851fc27..a2c0d11 100644
--- a/runtime/openjdkjvmti/ti_phase.h
+++ b/runtime/openjdkjvmti/ti_phase.h
@@ -42,6 +42,7 @@
class PhaseUtil {
public:
static jvmtiError GetPhase(jvmtiEnv* env, jvmtiPhase* phase_ptr);
+ static bool IsLivePhase();
static void Register(EventHandler* event_handler);
static void Unregister();