RFR (S): 8191129 - AARCH64: Invalid value passed to critical JNI function
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Wed Nov 29 11:16:47 UTC 2017
>> bug: https://bugs.openjdk.java.net/browse/JDK-8191129
>> webrev: http://cr.openjdk.java.net/~dchuyko/8191129/webrev.00/
>> 1. Platform specific part
>>
>> Original fix from JDK-8167409 was imported, it makes failures more
>> deterministic: Unimplemented() or ShouldNotReachHere(). Implementation
>> of the feature is not complete so another change is to forcibly set
>> CriticalJNINatives to false during initialization.
>>
>
> Do you want to print a warning if the flag was set to true on the
> command-line?
IMO it should be:
if (CriticalJNINatives) {
warning("CriticalJNINatives aren't supported");
FLAG_SET_DEFAULT(CriticalJNINatives, false);
}
There's on point in enabling it if it is known the functionality is broken.
Also, I question putting it into VM_Version::initialize().
I haven't found a proper place for such checks, but
VM_Version::get_processor_features() is where most of the
platform-specific setup is performed (besides *_pd).
Better to hear from aarch64 port maintainers where they prefer to see it.
>> 2. Common part (tests)
>>
>> Tests in criticalnatives read CriticalJNINatives flag using WhiteBox
>> and ignore values check if the flag is false.
>>
>
> Would "@requires vm.opt.CriticalJNINatives" also work?
I'd prefer to see the test explicitly specifying -XX:+CriticalJNINative
and excluded on aarch64 (@requires os.arch != aarch64) until the missing
functionality is implemented there.
But I'm fine with "@requires vm.opt.CriticalJNINatives" as well.
Best regards,
Vladimir Ivanov
More information about the hotspot-compiler-dev
mailing list