RFR: 8329109: Threads::print_on() tries to print CPU time for terminated GC threads [v2]

Albert Mingkun Yang ayang at openjdk.org
Wed Apr 3 16:51:10 UTC 2024


On Tue, 2 Apr 2024 12:28:10 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.
>
> Richard Reingruber has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Equivalent but simpler fix
>  - Revert
>    
>    This reverts commit 568a2bcc7a1c99ba9f95a33dbcb80eb511ead94b.

Marked as reviewed by ayang (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/18518#pullrequestreview-1977416349


More information about the hotspot-gc-dev mailing list