RFR: 8268852: AsyncLogWriter should not overide is_Named_thread()
David Holmes
dholmes at openjdk.java.net
Wed Jun 16 02:50:32 UTC 2021
On Wed, 16 Jun 2021 01:18:55 GMT, Xin Liu <xliu at openjdk.org> wrote:
> AsyncLogWriter is a subclass of NonJavaThread but not NamedThread. Therefore,
> is_Named_thread() must not return true.
>
> Testing:
>
> 1. hardcrash scenario:
> ...
> Other Threads:
> 0x00007f2870391f70 VMThread "VM Thread" [stack: 0x00007f2809d7d000,0x00007f2809e7d000] [id=76015]
> 0x00007f28706a1d70 WatcherThread [stack: 0x00007f28082f0000,0x00007f28083f0000] [id=76033]
> 0x00007f28702499b0 AsyncLog Thread [stack: 0x00007f2809e7f000,0x00007f2809f7f000] [id=76014]
> ...
>
> 2. jcmd $pid Thread.print
> ...
> "AsyncLog Thread" os_prio=0 cpu=1015.24ms elapsed=181.04s tid=0x00007f7b14c57fb0 nid=0x12ed8 runnable
> ...
Seems fine.
Thanks for fixing.
David
src/hotspot/share/runtime/thread.cpp line 651:
> 649: else if (this == AsyncLogWriter::instance()) {
> 650: st->print("%s", this->name());
> 651: } else { st->print("Thread"); }
This is a bit kludgy but then the whole name() handling is a mess - I will file a RFE to try and clean that up.
-------------
Marked as reviewed by dholmes (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/4503
More information about the hotspot-runtime-dev
mailing list