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

Volker Simonis simonis at openjdk.org
Fri Nov 25 11:53:36 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))

This pull request has now been integrated.

Changeset: df44cbff
Author:    Volker Simonis <simonis at openjdk.org>
URL:       https://git.openjdk.org/jdk8u-dev/commit/df44cbff663e6415ff75a5cf1a59d9836961ef27
Stats:     16 lines in 7 files changed: 8 ins; 2 del; 6 mod

8073464: GC workers do not have thread names

Reviewed-by: phh, andrew
Backport-of: a827cdfa1047ee0af30bb454aad2067420103bae

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

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


More information about the jdk8u-dev mailing list