RFR: 8320652: ThreadInfo.isInNative needs to be updated to say what executing native code means [v2]
Alan Bateman
alanb at openjdk.org
Wed Nov 29 10:52:09 UTC 2023
On Wed, 29 Nov 2023 06:44:58 GMT, David Holmes <dholmes at openjdk.org> wrote:
> JDWP filters its own internal threads out of any thread lists it returns, so this may be a case of using two different API's with different views of the set of threads running.
I think the issue that Bernd is running into is a long standing anomaly between ThreadMXBean.getAllThreadIds() and the ThreadMXBean.getThreadInfo methods. The former uses a ThreadsListEnumerator with include_jvmti_agent_threads=false so it filters out the JVMTI agent threads. The latter doesn't do the filtering so if you have threadId of a JVMTI agent thread then you can get its thread info.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16791#discussion_r1409102862
More information about the serviceability-dev
mailing list