< prev index next >

src/hotspot/share/runtime/arguments.cpp

Print this page

2927   UNSUPPORTED_OPTION(ProfileInterpreter);
2928 #endif
2929 
2930   // Parse the CompilationMode flag
2931   if (!CompilationModeFlag::initialize()) {
2932     return JNI_ERR;
2933   }
2934 
2935   if (!check_vm_args_consistency()) {
2936     return JNI_ERR;
2937   }
2938 
2939   if (!CDSConfig::check_vm_args_consistency(patch_mod_javabase, mode_flag_cmd_line)) {
2940     return JNI_ERR;
2941   }
2942 
2943 #ifndef CAN_SHOW_REGISTERS_ON_ASSERT
2944   UNSUPPORTED_OPTION(ShowRegistersOnAssert);
2945 #endif // CAN_SHOW_REGISTERS_ON_ASSERT
2946 






















2947   return JNI_OK;
2948 }
2949 
2950 // Helper class for controlling the lifetime of JavaVMInitArgs
2951 // objects.  The contents of the JavaVMInitArgs are guaranteed to be
2952 // deleted on the destruction of the ScopedVMInitArgs object.
2953 class ScopedVMInitArgs : public StackObj {
2954  private:
2955   JavaVMInitArgs _args;
2956   char*          _container_name;
2957   bool           _is_set;
2958   char*          _vm_options_file_arg;
2959 
2960  public:
2961   ScopedVMInitArgs(const char *container_name) {
2962     _args.version = JNI_VERSION_1_2;
2963     _args.nOptions = 0;
2964     _args.options = nullptr;
2965     _args.ignoreUnrecognized = false;
2966     _container_name = (char *)container_name;

2927   UNSUPPORTED_OPTION(ProfileInterpreter);
2928 #endif
2929 
2930   // Parse the CompilationMode flag
2931   if (!CompilationModeFlag::initialize()) {
2932     return JNI_ERR;
2933   }
2934 
2935   if (!check_vm_args_consistency()) {
2936     return JNI_ERR;
2937   }
2938 
2939   if (!CDSConfig::check_vm_args_consistency(patch_mod_javabase, mode_flag_cmd_line)) {
2940     return JNI_ERR;
2941   }
2942 
2943 #ifndef CAN_SHOW_REGISTERS_ON_ASSERT
2944   UNSUPPORTED_OPTION(ShowRegistersOnAssert);
2945 #endif // CAN_SHOW_REGISTERS_ON_ASSERT
2946 
2947 #ifdef _LP64
2948   if (UseCompactObjectHeaders && UseZGC && !ZGenerational) {
2949     if (FLAG_IS_CMDLINE(UseCompactObjectHeaders)) {
2950       warning("Single-generational ZGC does not work with compact object headers, disabling UseCompactObjectHeaders");
2951     }
2952     FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
2953   }
2954   if (UseCompactObjectHeaders && FLAG_IS_CMDLINE(UseCompressedClassPointers) && !UseCompressedClassPointers) {
2955     warning("Compact object headers require compressed class pointers. Disabling compact object headers.");
2956     FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
2957   }
2958   if (UseCompactObjectHeaders && LockingMode == LM_LEGACY) {
2959     FLAG_SET_DEFAULT(LockingMode, LM_LIGHTWEIGHT);
2960   }
2961   if (UseCompactObjectHeaders && !UseAltGCForwarding) {
2962     FLAG_SET_DEFAULT(UseAltGCForwarding, true);
2963   }
2964   if (UseCompactObjectHeaders && !UseCompressedClassPointers) {
2965     FLAG_SET_DEFAULT(UseCompressedClassPointers, true);
2966   }
2967 #endif
2968 
2969   return JNI_OK;
2970 }
2971 
2972 // Helper class for controlling the lifetime of JavaVMInitArgs
2973 // objects.  The contents of the JavaVMInitArgs are guaranteed to be
2974 // deleted on the destruction of the ScopedVMInitArgs object.
2975 class ScopedVMInitArgs : public StackObj {
2976  private:
2977   JavaVMInitArgs _args;
2978   char*          _container_name;
2979   bool           _is_set;
2980   char*          _vm_options_file_arg;
2981 
2982  public:
2983   ScopedVMInitArgs(const char *container_name) {
2984     _args.version = JNI_VERSION_1_2;
2985     _args.nOptions = 0;
2986     _args.options = nullptr;
2987     _args.ignoreUnrecognized = false;
2988     _container_name = (char *)container_name;
< prev index next >