RFR: 8296492: Remove ObjectLocker in JVMTI get_subgroups call

Coleen Phillimore coleenp at openjdk.org
Tue Nov 8 11:56:23 UTC 2022


On Tue, 8 Nov 2022 00:58:44 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> The JVM code took a ThreadGroup lock before poking into ThreadGroup fields.  Call a method in the ThreadGroup to call the synchronized method instead.
> Tested with tier 1-4.

Thanks Alan for your comment - yes, I think doing upcalls from JVMTI wasn't done before because of possible events, and it was the way things were done.  I'm glad this is okay now.
I'm going to file an issue for the error handling.  From  AddToSystemClassLoaderSearch - this is mapped to JVMTI_ERROR_INTERNAL when it's clearly (?) an OOM but there should be some sort of utility function.  Maybe there is already?

 // need the path as java.lang.String
    Handle path = java_lang_String::create_from_platform_dependent_str(segment, THREAD);
    if (HAS_PENDING_EXCEPTION) {
      CLEAR_PENDING_EXCEPTION;
      return JVMTI_ERROR_INTERNAL;
    }

-------------

PR: https://git.openjdk.org/jdk/pull/11033


More information about the hotspot-dev mailing list