RFR: 8348347: Cleanup JavaThread subclass support in SA [v2]

Chris Plummer cjplummer at openjdk.org
Tue Feb 11 23:37:12 UTC 2025


On Tue, 11 Feb 2025 23:15:38 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

>> Chris Plummer has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   update comments
>
> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ThreadStackTrace.java line 51:
> 
>> 49:         if (!thread.isJavaThread()) {
>> 50:             return;
>> 51:         }
> 
> Q: I wonder why is `!thread.isHiddenFromExternalView()` not used here. Have we always dumped the hidden from external view threads?

It's only used by the code below, which has already done the check:

           if (threadObj != null && !thread.isExiting() && !thread.isHiddenFromExternalView()) {

                // dump thread stack trace
                ThreadStackTrace st = new ThreadStackTrace(thread);
                st.dumpStack(-1);
                numThreads++;

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23456#discussion_r1951752872


More information about the serviceability-dev mailing list