RFR: 8258032: Reconsider LEAF entry restrictions
Coleen Phillimore
coleenp at openjdk.java.net
Thu Jan 7 22:30:06 UTC 2021
On Thu, 7 Jan 2021 21:20:49 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> Please review the smaller version of this enhancement. JRT_LEAF can allow Handles. Fixed places where a ResetNoHandleMark was added to workaround the restriction and remove some obsolete comments in deoptimization (the function is a JRT_BLOCK_ENTRY that has a HandleMarkCleaner which cleans up the HandleMark to the one before call_stub() in JavaCalls. A HandleMarkCleaner also allows HandleMark and Handles.
>>
>> Tested with tier1-3, 4-6 with the larger change and 7-8 in progress.
>
> src/hotspot/share/gc/z/zVerify.cpp line 376:
>
>> 374: // is no safepoint to protect against, and fiddling around with exceptions.
>> 375: class StackWatermarkProcessingMark {
>> 376: HandleMark _hm;
>
> Since you're removing the ResetNoHandleMark, you should revisit
> the comment block for the class. The entire sentence to revisit is:
> // ... It is mostly
> // due to problems that we might want to eventually clean up inside of the
> // frame iteration code, such as creating random handles even though there
> // is no safepoint to protect against, and fiddling around with exceptions.
This statement is still true. PreserveExceptionMark creates a Handle, so we need the HandleMark. We don't need to ResetNoHandleMark with this change.
PreserveExceptionMark::PreserveExceptionMark(Thread*& thread) {
thread = Thread::current();
_thread = thread;
_preserved_exception_oop = Handle(thread, _thread->pending_exception());
(which will create a Handle if there's a pending_exception).
> src/hotspot/share/runtime/interfaceSupport.inline.hpp line 493:
>
>> 491: ThreadInVMfromNative __tiv(thread); \
>> 492: debug_only(VMNativeEntryWrapper __vew;) \
>> 493: debug_only(ResetNoHandleMark __rnhm;) \
>
> Your fix for JDK-8259374 adds a ResetNoHandleMark to
> ThreadInVMfromNative so new L493 isn't needed.
Oh you're right. I'd missed this in the original. I'll remove this after I checkin the first one.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1990
More information about the hotspot-dev
mailing list