Description
Comments from David Holmes:
"
BTW: I noticed a separate bug in the crash log. You've defined:
bool is_Named_thread() const override { return true; }
for the AsyncLogWriter, but as you pointed out when I asked, this thread
can't be a NamedThread because that is a special kind of GC thread. So
that method should not be there.
"
I misunderstood is_Named_thread(). I thought it should return true as long as it has a name. It's incorrect! Only NamedThread and its subclasses return true.
Code like this is undefined for AsyncLogWriter. Its vtable doesn't have the entry for gc_id().
uint GCId::current_or_undefined() {
return Thread::current()->is_Named_thread() ? currentNamedthread()->gc_id() : undefined();
}
"
BTW: I noticed a separate bug in the crash log. You've defined:
bool is_Named_thread() const override { return true; }
for the AsyncLogWriter, but as you pointed out when I asked, this thread
can't be a NamedThread because that is a special kind of GC thread. So
that method should not be there.
"
I misunderstood is_Named_thread(). I thought it should return true as long as it has a name. It's incorrect! Only NamedThread and its subclasses return true.
Code like this is undefined for AsyncLogWriter. Its vtable doesn't have the entry for gc_id().
uint GCId::current_or_undefined() {
return Thread::current()->is_Named_thread() ? currentNamedthread()->gc_id() : undefined();
}
Attachments
Issue Links
- relates to
-
JDK-8229517 Support for optional asynchronous/buffered logging
-
- Resolved
-