RFR: 8265327: Remove check_safepoint_and_suspend_for_native_trans() [v2]

Richard Reingruber rrich at openjdk.java.net
Tue Apr 20 16:05:05 UTC 2021


On Tue, 20 Apr 2021 04:26:18 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> src/hotspot/share/runtime/thread.hpp line 1325:
>> 
>>> 1323:     // under SR_lock in java_suspend_self().
>>> 1324:     return (_special_runtime_exit_condition != _no_async_condition) ||
>>> 1325:            (_suspend_flags & (_external_suspend | _obj_deopt JFR_ONLY(| _trace_flag))) != 0;
>> 
>> I don't see this change mentioned in the bug report and it's
>> not obvious why you're changing this code. Also, I think this
>> is going to conflict with @robehn fix for JDK-8257831.
>
> Unless there is some significant performance issue with the lack of inlining I'd prefer to maintain code readability. And with Robbin's change is the inlining simplified anyway? Otherwise perhaps we should (re-)introduce is_any_suspend() to encapsulate the _suspend_flag checking?

IMHO it is straight forward to check for multiple bits using a mask.
I like that this improves fast paths e.g. of JNI calls.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3548


More information about the hotspot-runtime-dev mailing list