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

TieredCompilation can be enabled even if TIERED is undefined

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • hs25
    • hs25
    • hotspot
    • b45

        If COMPILER2 is defined, it will be possible to enable TieredCompilation even if TIERED is undefined. But such VM will raise error at compilationPolicy_init:

        # Internal Error (/opt/jprt/T/P1/103140.bdelsart/s/src/share/vm/runtime/compilationPolicy.cpp:80), pid=27962, tid=4136668016
        # Error: Unimplemented()
        V [libjvm.so+0xb2bf4a] VMError::report_and_die()+0x1ba
        V [libjvm.so+0x480439] report_unimplemented(char const*, int)+0x69
        V [libjvm.so+0x3fb488] compilationPolicy_init()+0x88
        V [libjvm.so+0x607353] init_globals()+0x103
        V [libjvm.so+0xac630e] Threads::create_vm(JavaVMInitArgs*, bool*)+0x27e
        V [libjvm.so+0x66ea0c] JNI_CreateJavaVM+0x8c
        C [libjli.so+0x6c78] JavaMain+0x98

        suggested fix:
        diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments.cpp
        --- a/src/share/vm/runtime/arguments.cpp
        +++ b/src/share/vm/runtime/arguments.cpp
        @@ -3123,14 +3123,17 @@
             FLAG_SET_DEFAULT(UseLargePages, false);
           }
                                                                                                                                                                                                                                         
        - // Tiered compilation is undefined with C1.
        - TieredCompilation = false;
         #else
           if (!FLAG_IS_DEFAULT(OptoLoopAlignment) && FLAG_IS_DEFAULT(MaxLoopPad)) {
             FLAG_SET_DEFAULT(MaxLoopPad, OptoLoopAlignment-1);
           }
         #endif
        -
        +#ifndef TIERED
        + // Tiered compilation is undefined.
        + if (TieredCompilation) {
        + FLAG_SET_DEFAULT(TieredCompilation, false);
        + }
        +#endif
           // If we are running in a headless jre, force java.awt.headless property
           // to be true unless the property has already been set.
           // Also allow the OS environment variable JAVA_AWT_HEADLESS to set headless state.

              iignatyev Igor Ignatyev (Inactive)
              iignatyev Igor Ignatyev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: