RFR: 8258192: Obsolete the CriticalJNINatives flag
Coleen Phillimore
coleenp at openjdk.java.net
Thu Nov 11 14:22:45 UTC 2021
On Thu, 11 Nov 2021 07:19:57 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> This change removes the disabled CriticalJNINatives code, and the flag now gives an obsolete message.
>> Tested with tier1 on cpus x64, aarch64, and builds on linux-x86-open,linux-s390x-open,linux-arm32-debug,linux-ppc64le-debug.
>
> src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp line 1551:
>
>> 1549: int total_c_args = total_in_args+1;
>> 1550: if (method->is_static()) {
>> 1551: total_c_args++;
>
> In this patch, sometimes we keep the if structure, like here, but in other places, we replace this with:
>
> int total_c_args = total_in_args + (method->is_static() ? 2 : 1)
>
> Should probably stick with a single style.
Ok, that's a good suggestion. Some platforms have a method_is_static boolean and some don't, so I didn't clean up the platforms that do that later in a different way (or inconsistently).
> src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp line 1793:
>
>> 1791: int c_arg = arg_order.at(ai + 1);
>> 1792: __ block_comment(err_msg("move %d -> %d", i, c_arg));
>> 1793: assert (c_arg != -1, "wrong direction");
>
> `assert (c_arg != -1 && i != -1, "wrong direction");`?
removed.
> src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp line 1905:
>
>> 1903: } else {
>> 1904: // Compute a valid move order, using tmp_vmreg to break any cycles
>> 1905: ComputeMoveOrder cmo(total_in_args, in_regs, total_c_args, out_regs, in_sig_bt, arg_order, tmp_vmreg);
>
> `ComputeMoveOrder` is still used somewhere, or?
Yes, it's used in
cpu/x86/universalUpcallHandler_x86_64.cpp: SharedRuntime::compute_move_order(in_sig_bt,
> src/hotspot/share/runtime/sharedRuntime.cpp line 3019:
>
>> 3017: if (CriticalJNINatives && !method->is_method_handle_intrinsic()) {
>> 3018: // We perform the I/O with transition to native before acquiring AdapterHandlerLibrary_lock.
>> 3019: critical_entry = NativeLookup::lookup_critical_entry(method);
>
> `critical_entry` variable is now redundant?
removed, thanks for spotting that.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6343
More information about the hotspot-dev
mailing list