RFR: 8255718: Zero: VM should know it runs in interpreter-only mode
Coleen Phillimore
coleenp at openjdk.java.net
Mon Nov 2 23:05:53 UTC 2020
On Sun, 1 Nov 2020 17:24:44 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> There are many tests in tier1 that fail with Zero, because they supply -XX:+TieredCompilation, and that makes VM code believe it runs in "mixed" mode.
>
> Can be reproduced trivially by running anything with -XX:+TieredCompilation. Then Zero fails when runtime asks it to produce a native wrapper for MH intrinsics. That code is normally protected by Arguments::is_interpreter_only.
>
> Method* SystemDictionary::find_method_handle_intrinsic(vmIntrinsics::ID iid,
> Symbol* signature,
> TRAPS) {
> ...
> if (!Arguments::is_interpreter_only()) { // <--- checks here
> // Generate a compiled form of the MH intrinsic.
> AdapterHandlerLibrary::create_native_wrapper(m); // <--- fails through here
> }
>
> Then in `sharedRuntime_zero.cpp`:
>
> nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
> const methodHandle& method,
> int compile_id,
> BasicType *sig_bt,
> VMRegPair *regs,
> BasicType ret_type,
> address critical_entry) {
> ShouldNotCallThis(); // <--- crashes here
> return NULL;
> }
>
> ...so:
>
> $ build/linux-x86_64-zero-fastdebug/images/jdk/bin/java -XX:+TieredCompilation
> OpenJDK 64-Bit Zero VM warning: -XX:+TieredCompilation not supported in this VM
> # To suppress the following error report, specify this argument
> # after -XX: or in .hotspotrc: SuppressErrorAt=/sharedRuntime_zero.cpp:80
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> # Internal Error (/home/shade/trunks/jdk/src/hotspot/cpu/zero/sharedRuntime_zero.cpp:80), pid=404967, tid=404968
> # Error: ShouldNotCall()
>
> Additional testing:
> - [x] ad-hoc Hello World runs with Linux x86_64 Zero
> - [x] re-run some failed `tier1` tests with Linux x86_64 Zero, now passing
Looks good. Thank you for taking care of Zero.
-------------
Marked as reviewed by coleenp (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/985
More information about the hotspot-runtime-dev
mailing list