[jdk8u-dev] RFR: 8073464: GC workers do not have thread names

Andrew John Hughes andrew at openjdk.org
Fri Nov 25 03:57:10 UTC 2022


On Thu, 17 Nov 2022 10:32:59 GMT, Volker Simonis <simonis at openjdk.org> wrote:

> This is a backport of "[JDK-8073464: GC workers do not have thread names](https://bugs.openjdk.org/browse/JDK-8073464)" which I request for parity with Oracle JDK 8 where it was downported to 8u351 (see [JDK-8285732](https://bugs.openjdk.org/browse/JDK-8285732)). This downport depends on "[JDK-6885993: Named Thread: introduce print() and print_on(outputStream* st) methods](https://bugs.openjdk.org/browse/JDK-6885993)" for which a [pull request already exists](https://github.com/openjdk/jdk8u-dev/pull/183).
> 
> Both of these changes are required to fix the native names of internal threads like for example GC threads. This does not only simplify debugging, but also helps observability tools. Finally, these two changes fix the "sun.management.HotspotInternal" MxBean which returns the "[InternalThreadCpuTimes](https://stackoverflow.com/questions/3947467/with-recent-sun-jvms-1-6-is-it-possible-to-get-gc-thread-information/4113407#4113407)". The "InternalThreadCpuTimes" attribute returns a map with a thread-name to thread-cpu-time mapping but is currently broken in JDK 8 because internal threads without native names (e.g. GC threads) are all mapped to the same entry (i.e. "Unknown").
> 
> The patch applies cleanly except for two copyright year mismatches in `concurrentGCThread.cpp` and `thread.hpp`.   I've attached a diff of this patch compared to the original JDK 9 patch to this PR for your convenience (see [8073464-jdk8-vs-jdk9.txt](https://github.com/openjdk/jdk8u-dev/files/10030509/8073464-jdk8-vs-jdk9.txt))

Looks good to me.

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

Marked as reviewed by andrew (Reviewer).

PR: https://git.openjdk.org/jdk8u-dev/pull/184


More information about the jdk8u-dev mailing list