Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8296502

AARCH64: fail to build variant=core on 11u

XMLWordPrintable

    • aarch64
    • generic

      Reproducible:
      $sh ./configure --with-debug-level=release --with-jvm-variants=core

      $ make hotspot CONF=linux-aarch64-normal-core-releas
      Building target 'hotspot' in configuration 'linux-aarch64-normal-core-release'
      Creating support/modules_libs/java.base/server/libjvm.so from 1 file(s)
      In file included from /home/ubuntu/Devel/jdk11u-dev/src/hotspot/share/memory/allocation.hpp:28,
                       from /home/ubuntu/Devel/jdk11u-dev/src/hotspot/share/oops/array.hpp:28,
                       from /home/ubuntu/Devel/jdk11u-dev/src/hotspot/share/memory/universe.hpp:28,
                       from /home/ubuntu/Devel/jdk11u-dev/src/hotspot/share/code/oopRecorder.hpp:28,
                       from /home/ubuntu/Devel/jdk11u-dev/src/hotspot/share/asm/codeBuffer.hpp:28,
                       from /home/ubuntu/Devel/jdk11u-dev/src/hotspot/share/asm/assembler.hpp:28,
                       from /home/ubuntu/Devel/jdk11u-dev/src/hotspot/share/precompiled/precompiled.hpp:31:
      /home/ubuntu/Devel/jdk11u-dev/src/hotspot/share/runtime/globals.hpp:2765:75: error: 'pd_InlineSmallCode' was not declared in this scope; did you mean 'InlineSmallCode'?
       2765 | #define MATERIALIZE_PD_PRODUCT_FLAG(type, name, doc) type name = pd_##name;
            | ^~~
      /home/ubuntu/Devel/jdk11u-dev/src/hotspot/share/runtime/globals.hpp:1702:3: note: in expansion of macro 'MATERIALIZE_PD_PRODUCT_FLAG'
       1702 | product_pd(intx, InlineSmallCode, \
            | ^~~~~~~~~~
      /home/ubuntu/Devel/jdk11u-dev/src/hotspot/share/runtime/globals.hpp:2703:3: note: in expansion of macro 'RUNTIME_FLAGS'
       2703 | RUNTIME_FLAGS( \
            | ^~~~~~~~~~~~~
      /home/ubuntu/Devel/jdk11u-dev/src/hotspot/share/runtime/globals.cpp:51:1: note: in expansion of macro 'VM_FLAGS'
         51 | VM_FLAGS(MATERIALIZE_DEVELOPER_FLAG, \
            | ^~~~~~~~
      make[3]: *** [lib/CompileJvm.gmk:155: /home/ubuntu/Devel/jdk11u-dev/build/linux-aarch64-normal-core-release/hotspot/variant-core/libjvm/objs/globals.o] Error 1
      make[3]: *** Waiting for unfinished jobs....
      make[2]: *** [make/Main.gmk:272: hotspot-core-libs] Error 2

      Analysis:
      globals.hpp define InlineSmallCode and it requires dp_InlineSmallCode.

        product_pd(intx, InlineSmallCode, \
                "Only inline already compiled methods if their code size is " \
                "less than this") \
                range(0, max_jint) \
                                                                                  \
      on aarch64, its defined by in src/hotspot/cpu/aarch64/globals_aarch64.hpp

      #if defined(COMPILER1) || defined(COMPILER2)
      define_pd_global(intx, InlineSmallCode, 1000);
      #endif

      variant=core means interpreter-only. Neither COMPILER1 nor COMPILER2 is defined then, so we don't have pd_InlineSmallCode.

      JDK-8235673 split InlineSmallCode and other inline-relevant flags to c1_globals.hpp and c2_globals.hpp. I think we need to backport it first to unlock variant=core.

            Unassigned Unassigned
            xliu Xin Liu
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: