RFR: 8254842: [JVMCI] copy thread name when attaching libgraal thread to HotSpot [v2]

Vladimir Kozlov kvn at openjdk.java.net
Fri Oct 16 17:54:11 UTC 2020


On Fri, 16 Oct 2020 16:56:21 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

>> This PR modifies `HotSpotJVMCIRuntime.attachCurrentThread` when it is called from within libgraal so that the name of
>> the thread in the libgraal heap is used as the name of the peer thread created in HotSpot.
>> This useful when viewing output such as `-XX:JVMCITraceLevel=1`. For example, here's sample output without this PR:
>> JVMCITrace-1[Thread-0]: initializing JVMCI runtime -1
>> JVMCITrace-1[Thread-0]: initialized JVMCI runtime -1
>> and then with:
>> JVMCITrace-1[LibGraalHotSpotGraalManagementInitialization]: initializing JVMCI runtime -1
>> JVMCITrace-1[LibGraalHotSpotGraalManagementInitialization]: initialized JVMCI runtime -1
>
> Doug Simon has updated the pull request incrementally with one additional commit since the last revision:
> 
>   add guarantee to clarify name argument must not be null

src/hotspot/share/jvmci/jvmciCompilerToVM.cpp line 2354:

> 2352: C2V_VMENTRY_PREFIX(jboolean, attachCurrentThread, (JNIEnv* env, jobject c2vm, jbyteArray name, jboolean
> as_daemon)) 2353:   if (thread == NULL) {
> 2354:     // Called from unattached JVMCI shared library thread

What "unattached" means?

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

PR: https://git.openjdk.java.net/jdk/pull/684


More information about the hotspot-compiler-dev mailing list