Skip to content

Commit

Permalink
8268852: AsyncLogWriter should not overide is_Named_thread()
Browse files Browse the repository at this point in the history
Backport-of: 02c9bf087e50885bbc8028415c4e674947ee7a16
  • Loading branch information
shipilev committed Jul 6, 2023
1 parent 688a823 commit 8a9162f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/hotspot/share/logging/logAsyncWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ class AsyncLogWriter : public NonJavaThread {
log_debug(logging, thread)("starting AsyncLog Thread tid = " INTX_FORMAT, os::current_thread_id());
}
char* name() const override { return (char*)"AsyncLog Thread"; }
bool is_Named_thread() const override { return true; }
void print_on(outputStream* st) const override {
st->print("\"%s\" ", name());
Thread::print_on(st);
Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/share/runtime/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,9 @@ void Thread::print_on_error(outputStream* st, char* buf, int buflen) const {
else if (is_GC_task_thread()) { st->print("GCTaskThread"); }
else if (is_Watcher_thread()) { st->print("WatcherThread"); }
else if (is_ConcurrentGC_thread()) { st->print("ConcurrentGCThread"); }
else { st->print("Thread"); }
else if (this == AsyncLogWriter::instance()) {
st->print("%s", this->name());
} else { st->print("Thread"); }

if (is_Named_thread()) {
st->print(" \"%s\"", name());
Expand Down

1 comment on commit 8a9162f

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.