Integrated: 8329109: Threads::print_on() tries to print CPU time for terminated GC threads

Richard Reingruber rrich at openjdk.org
Fri Apr 5 06:30:12 UTC 2024


On Wed, 27 Mar 2024 16:09:46 GMT, Richard Reingruber <rrich at openjdk.org> wrote:

> *EDIT 2024-04-02:* Use `Threads::non_java_threads_do(ThreadClosure* tc)` to print non-java threads (commit b2dabc95d760496d4896b30ef1a44cc5c250189d). It uses thread list iterators that synchronize with thread creation and termination. If a non-java thread is about to terminate, it waits for in progress iterations (see [NonJavaThread::remove_from_the_list](https://github.com/openjdk/jdk/blob/47f33a59eaaffc74881fcc9e29d13ff9b2538c2a/src/hotspot/share/runtime/nonJavaThread.cpp#L97-L102)).
> 
> Testing:
> 
> The output of a minimal example with G1 is almost identical (attached below). The order of non-java threads can differ.
> 
> The fix passed our CI testing: JTReg tests: tier1-4 of hotspot and jdk. All of Langtools and jaxp. JCK, SPECjvm2008, SPECjbb2015, Renaissance Suite, and SAP specific tests.
> Testing was done with fastdebug builds on the main platforms and also on Linux/PPC64le.

This pull request has now been integrated.

Changeset: c1cfb43d
Author:    Richard Reingruber <rrich at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/c1cfb43d8de8d0eed01b9bb6aa1202dc7cbff007
Stats:     4 lines in 1 file changed: 0 ins; 3 del; 1 mod

8329109: Threads::print_on() tries to print CPU time for terminated GC threads

Reviewed-by: mbaesken, dholmes, ayang

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

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


More information about the hotspot-gc-dev mailing list