RFR: 8265327: Remove check_safepoint_and_suspend_for_native_trans() [v2]
Patricio Chilano Mateo
pchilanomate at openjdk.java.net
Mon Apr 19 21:39:18 UTC 2021
> Hi,
>
> Please review this small fix. Method check_safepoint_and_suspend_for_native_trans() can just be removed and the code moved directly to check_special_condition_for_native_trans(). The other caller, transition_from_native(), can also just call SafepointMechanism::process_if_requested_with_exit_check() after transitioning to _thread_in_native_trans. Since that removes the only caller of is_suspend_after_native() I also removed it.
> I also made a small fix to has_special_runtime_exit_condition(). The compilers were generating three different comparisons for _suspend_flags instead of combining the constant values and doing a single one (I checked this with gcc 10.2 on linux and clang-12 on macos). The extra code was preventing inlining on some cases. For instance, on a Linux release build with gcc 10.2, for the ThreadInVMfromNative constructor, transition_from_native() was being inlined but not process_if_requested_with_exit_check(), so we still required a call for the fast case. The small change to has_special_runtime_exit_condition() fixed that.
> Tested in mach5 tiers1-2.
>
> Thanks,
>
> Patricio
Patricio Chilano Mateo has updated the pull request incrementally with one additional commit since the last revision:
fix typo in comment for check_special_condition_for_native_trans
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/3548/files
- new: https://git.openjdk.java.net/jdk/pull/3548/files/a8744c07..aec3dd71
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3548&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3548&range=00-01
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.java.net/jdk/pull/3548.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/3548/head:pull/3548
PR: https://git.openjdk.java.net/jdk/pull/3548
More information about the hotspot-runtime-dev
mailing list