RFR: 8259374: Make ThreadInVMfromNative have ResetNoHandleMark [v2]

David Holmes david.holmes at oracle.com
Wed Jan 13 01:27:34 UTC 2021


On 12/01/2021 11:17 pm, Coleen Phillimore wrote:
> On Fri, 8 Jan 2021 13:14:36 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> 
>>> src/hotspot/share/runtime/interfaceSupport.inline.hpp line 195:
>>>
>>>> 193:
>>>> 194: class ThreadInVMfromNative : public ThreadStateTransition {
>>>> 195:   ResetNoHandleMark __rnhm;
>>>
>>> We should add a constructor for RNHM that takes the current thread so that we don't have to call Thread::current() unnecessarily in the existing RNHM constructor.
>>
>> Ok but the ResetNoHandleMark implementation disappears in product mode, so it doesn't actually call Thread::current() in product mode.
> 
> I forgot to push the change up to add a ResetNoHandleMark that takes a Thread* parameter.  Since it evaporates in product mode, I don't think it's needed or helpful.  I could add it back with https://github.com/openjdk/jdk/pull/1990 if you insist.

I'd overlooked this was not-product, so it is fine.

Thanks for checking.

David

> -------------
> 
> PR: https://git.openjdk.java.net/jdk/pull/1983
> 


More information about the hotspot-dev mailing list