hotspot/src/share/vm/runtime/arguments.cpp
changeset 19159 d3859e1b62da
parent 18998 fe1467a81767
parent 19155 706406e1c98e
child 19319 0ad35be0733a
child 22827 07d991d45a51
equal deleted inserted replaced
19140:ad713134d84c 19159:d3859e1b62da
    57 #endif // INCLUDE_ALL_GCS
    57 #endif // INCLUDE_ALL_GCS
    58 
    58 
    59 // Note: This is a special bug reporting site for the JVM
    59 // Note: This is a special bug reporting site for the JVM
    60 #define DEFAULT_VENDOR_URL_BUG "http://bugreport.sun.com/bugreport/crash.jsp"
    60 #define DEFAULT_VENDOR_URL_BUG "http://bugreport.sun.com/bugreport/crash.jsp"
    61 #define DEFAULT_JAVA_LAUNCHER  "generic"
    61 #define DEFAULT_JAVA_LAUNCHER  "generic"
       
    62 
       
    63 // Disable options not supported in this release, with a warning if they
       
    64 // were explicitly requested on the command-line
       
    65 #define UNSUPPORTED_OPTION(opt, description)                    \
       
    66 do {                                                            \
       
    67   if (opt) {                                                    \
       
    68     if (FLAG_IS_CMDLINE(opt)) {                                 \
       
    69       warning(description " is disabled in this release.");     \
       
    70     }                                                           \
       
    71     FLAG_SET_DEFAULT(opt, false);                               \
       
    72   }                                                             \
       
    73 } while(0)
       
    74 
       
    75 #define UNSUPPORTED_GC_OPTION(gc)                                     \
       
    76 do {                                                                  \
       
    77   if (gc) {                                                           \
       
    78     if (FLAG_IS_CMDLINE(gc)) {                                        \
       
    79       warning(#gc " is not supported in this VM.  Using Serial GC."); \
       
    80     }                                                                 \
       
    81     FLAG_SET_DEFAULT(gc, false);                                      \
       
    82   }                                                                   \
       
    83 } while(0)
    62 
    84 
    63 char**  Arguments::_jvm_flags_array             = NULL;
    85 char**  Arguments::_jvm_flags_array             = NULL;
    64 int     Arguments::_num_jvm_flags               = 0;
    86 int     Arguments::_num_jvm_flags               = 0;
    65 char**  Arguments::_jvm_args_array              = NULL;
    87 char**  Arguments::_jvm_args_array              = NULL;
    66 int     Arguments::_num_jvm_args                = 0;
    88 int     Arguments::_num_jvm_args                = 0;
  3126     // Note that large pages are enabled/disabled for both the
  3148     // Note that large pages are enabled/disabled for both the
  3127     // Java heap and the code cache.
  3149     // Java heap and the code cache.
  3128     FLAG_SET_DEFAULT(UseLargePages, false);
  3150     FLAG_SET_DEFAULT(UseLargePages, false);
  3129   }
  3151   }
  3130 
  3152 
  3131   // Tiered compilation is undefined with C1.
       
  3132   TieredCompilation = false;
       
  3133 #else
  3153 #else
  3134   if (!FLAG_IS_DEFAULT(OptoLoopAlignment) && FLAG_IS_DEFAULT(MaxLoopPad)) {
  3154   if (!FLAG_IS_DEFAULT(OptoLoopAlignment) && FLAG_IS_DEFAULT(MaxLoopPad)) {
  3135     FLAG_SET_DEFAULT(MaxLoopPad, OptoLoopAlignment-1);
  3155     FLAG_SET_DEFAULT(MaxLoopPad, OptoLoopAlignment-1);
  3136   }
  3156   }
       
  3157 #endif
       
  3158 
       
  3159 #ifndef TIERED
       
  3160   // Tiered compilation is undefined.
       
  3161   UNSUPPORTED_OPTION(TieredCompilation, "TieredCompilation");
  3137 #endif
  3162 #endif
  3138 
  3163 
  3139   // If we are running in a headless jre, force java.awt.headless property
  3164   // If we are running in a headless jre, force java.awt.headless property
  3140   // to be true unless the property has already been set.
  3165   // to be true unless the property has already been set.
  3141   // Also allow the OS environment variable JAVA_AWT_HEADLESS to set headless state.
  3166   // Also allow the OS environment variable JAVA_AWT_HEADLESS to set headless state.
  3276     }
  3301     }
  3277     UseSharedSpaces = false;
  3302     UseSharedSpaces = false;
  3278   }
  3303   }
  3279 }
  3304 }
  3280 
  3305 
  3281 // Disable options not supported in this release, with a warning if they
       
  3282 // were explicitly requested on the command-line
       
  3283 #define UNSUPPORTED_OPTION(opt, description)                    \
       
  3284 do {                                                            \
       
  3285   if (opt) {                                                    \
       
  3286     if (FLAG_IS_CMDLINE(opt)) {                                 \
       
  3287       warning(description " is disabled in this release.");     \
       
  3288     }                                                           \
       
  3289     FLAG_SET_DEFAULT(opt, false);                               \
       
  3290   }                                                             \
       
  3291 } while(0)
       
  3292 
       
  3293 
       
  3294 #define UNSUPPORTED_GC_OPTION(gc)                                     \
       
  3295 do {                                                                  \
       
  3296   if (gc) {                                                           \
       
  3297     if (FLAG_IS_CMDLINE(gc)) {                                        \
       
  3298       warning(#gc " is not supported in this VM.  Using Serial GC."); \
       
  3299     }                                                                 \
       
  3300     FLAG_SET_DEFAULT(gc, false);                                      \
       
  3301   }                                                                   \
       
  3302 } while(0)
       
  3303 
       
  3304 #if !INCLUDE_ALL_GCS
  3306 #if !INCLUDE_ALL_GCS
  3305 static void force_serial_gc() {
  3307 static void force_serial_gc() {
  3306   FLAG_SET_DEFAULT(UseSerialGC, true);
  3308   FLAG_SET_DEFAULT(UseSerialGC, true);
  3307   FLAG_SET_DEFAULT(CMSIncrementalMode, false);  // special CMS suboption
  3309   FLAG_SET_DEFAULT(CMSIncrementalMode, false);  // special CMS suboption
  3308   UNSUPPORTED_GC_OPTION(UseG1GC);
  3310   UNSUPPORTED_GC_OPTION(UseG1GC);