RFR: 8307517: Add VMErrorCallback infrastructure to extend hs_err dumping
David Holmes
dholmes at openjdk.org
Mon May 8 06:18:18 UTC 2023
On Fri, 5 May 2023 16:42:22 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> src/hotspot/share/utilities/vmError.hpp line 232:
>>
>>> 230:
>>> 231: class VMErrorCallbackMark : public StackObj {
>>> 232: Thread* _thread;
>>
>> Why would we need the thread here? Why not use Thread::current in dtor? This object is only used as stack object, right?
>
> I was treading in Runtime code and Coleen usually wants to use cached-away Thread pointers instead of calling Thread::current() repeatedly. I'm fine with either solution.
Given the context it would have to be `Thread::current_or_null_safe()`. But yes we prefer not to re-materialize the current thread if we already have it at hand.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13824#discussion_r1187061050
More information about the hotspot-dev
mailing list