RFR: 8268425: Show decimal nid of OSThread instead of hex format one [v2]
Thomas Stuefe
stuefe at openjdk.java.net
Mon Jun 28 09:20:02 UTC 2021
On Mon, 28 Jun 2021 08:58:09 GMT, Kevin Walls <kevinw at openjdk.org> wrote:
> Hi,
> If you attach WinDbg on Windows to a JVM, you might be glad of the nid=0x... format as that is its choice of base for the thread ids.
> So this depends on your tools. Maybe frustrated top users outnumber happy WinDbg users for the JVM, and maybe they don't. Maybe this change delights some users and frustrates others.
Why not do it platform dependent then? This would make sense especially since the type is opaque. Let each platform handling printing. Windows can hex-print its DWORD thread id. Linux can print its kernel LWP. And platforms where the thread id is 64bit, or a structure, can print that.
For now default implementations could live in `os::Windows::print_thread_id(thread_t)` and `os::Posix::print_thread_id(thread_t)`, respectively.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4449
More information about the serviceability-dev
mailing list