RFR: 8254842: [JVMCI] copy thread name when attaching libgraal thread to HotSpot
Vladimir Kozlov
kvn at openjdk.java.net
Thu Oct 15 19:18:19 UTC 2020
On Thu, 15 Oct 2020 13:29:39 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
src/hotspot/share/jvmci/jvmciCompilerToVM.cpp line 2358:
> 2356: JNIEnv* hotspotEnv;
> 2357:
> 2358: int name_len = env->GetArrayLength(name);
`name` could be NULL based on code in attachCurrentThread. Should we check for NULL here?
-------------
PR: https://git.openjdk.java.net/jdk/pull/684
More information about the hotspot-compiler-dev
mailing list