8296492: Remove ObjectLocker in JVMTI get_subgroups call

Reviewed-by: dholmes, alanb, sspitsyn
This commit is contained in:
Coleen Phillimore 2022-11-17 11:58:00 +00:00
parent 171553a611
commit d8c809b196
7 changed files with 56 additions and 100 deletions

View file

@ -792,6 +792,14 @@ public class ThreadGroup implements Thread.UncaughtExceptionHandler {
}
}
/**
* Returns a snapshot of the subgroups as an array, used by JVMTI.
*/
private ThreadGroup[] subgroupsAsArray() {
List<ThreadGroup> groups = synchronizedSubgroups();
return groups.toArray(new ThreadGroup[0]);
}
/**
* Returns a snapshot of the subgroups.
*/