Send ThreadEnd after clearing ThreadGroup.
The removal of a thread from it's thread group does cause managed code
to execute so it could cause additional events to trigger in agents,
potentially causing deadlocks. This changes where the event is
triggered to put it after the thread has been removed from its group.
Test: ./test.py --host -j50
Bug: 67104807
Change-Id: I53f53b2823835a9629842fb5c22079b3e42042d5
diff --git a/test/1923-frame-pop/src/art/Trace.java b/test/1923-frame-pop/src/art/Trace.java
index ba3d397..8999bb1 100644
--- a/test/1923-frame-pop/src/art/Trace.java
+++ b/test/1923-frame-pop/src/art/Trace.java
@@ -53,4 +53,16 @@
public static native void watchFieldModification(Field f);
public static native void watchAllFieldAccesses();
public static native void watchAllFieldModifications();
+
+ // the names, arguments, and even line numbers of these functions are embedded in the tests so we
+ // need to add to the bottom and not modify old ones to maintain compat.
+ public static native void enableTracing2(Class<?> methodClass,
+ Method entryMethod,
+ Method exitMethod,
+ Method fieldAccess,
+ Method fieldModify,
+ Method singleStep,
+ Method ThreadStart,
+ Method ThreadEnd,
+ Thread thr);
}