RFR: 8329109: Threads::print_on() tries to print CPU time for terminated GC threads [v2]
Richard Reingruber
rrich at openjdk.org
Fri Apr 5 06:30:12 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.
Thanks for the reviews. I think this is ready now...
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18518#issuecomment-2039038071
More information about the hotspot-gc-dev
mailing list