< prev index next >

src/hotspot/share/runtime/arguments.cpp

Print this page

3078   if (UseSharedSpaces && patch_mod_javabase) {
3079     no_shared_spaces("CDS is disabled when " JAVA_BASE_NAME " module is patched.");
3080   }
3081   if (UseSharedSpaces && !DumpSharedSpaces && check_unsupported_cds_runtime_properties()) {
3082     UseSharedSpaces = false;
3083   }
3084 
3085   if (DumpSharedSpaces || DynamicDumpSharedSpaces) {
3086     // Always verify non-system classes during CDS dump
3087     if (!BytecodeVerificationRemote) {
3088       BytecodeVerificationRemote = true;
3089       log_info(cds)("All non-system classes will be verified (-Xverify:remote) during CDS dump time.");
3090     }
3091   }
3092 #endif
3093 
3094 #ifndef CAN_SHOW_REGISTERS_ON_ASSERT
3095   UNSUPPORTED_OPTION(ShowRegistersOnAssert);
3096 #endif // CAN_SHOW_REGISTERS_ON_ASSERT
3097 




















3098   return JNI_OK;
3099 }
3100 
3101 // Helper class for controlling the lifetime of JavaVMInitArgs
3102 // objects.  The contents of the JavaVMInitArgs are guaranteed to be
3103 // deleted on the destruction of the ScopedVMInitArgs object.
3104 class ScopedVMInitArgs : public StackObj {
3105  private:
3106   JavaVMInitArgs _args;
3107   char*          _container_name;
3108   bool           _is_set;
3109   char*          _vm_options_file_arg;
3110 
3111  public:
3112   ScopedVMInitArgs(const char *container_name) {
3113     _args.version = JNI_VERSION_1_2;
3114     _args.nOptions = 0;
3115     _args.options = nullptr;
3116     _args.ignoreUnrecognized = false;
3117     _container_name = (char *)container_name;

3078   if (UseSharedSpaces && patch_mod_javabase) {
3079     no_shared_spaces("CDS is disabled when " JAVA_BASE_NAME " module is patched.");
3080   }
3081   if (UseSharedSpaces && !DumpSharedSpaces && check_unsupported_cds_runtime_properties()) {
3082     UseSharedSpaces = false;
3083   }
3084 
3085   if (DumpSharedSpaces || DynamicDumpSharedSpaces) {
3086     // Always verify non-system classes during CDS dump
3087     if (!BytecodeVerificationRemote) {
3088       BytecodeVerificationRemote = true;
3089       log_info(cds)("All non-system classes will be verified (-Xverify:remote) during CDS dump time.");
3090     }
3091   }
3092 #endif
3093 
3094 #ifndef CAN_SHOW_REGISTERS_ON_ASSERT
3095   UNSUPPORTED_OPTION(ShowRegistersOnAssert);
3096 #endif // CAN_SHOW_REGISTERS_ON_ASSERT
3097 
3098 #ifdef _LP64
3099   if (UseCompactObjectHeaders && UseZGC && !ZGenerational) {
3100     warning("Single-generational ZGC does not work with compact object headers, disabling UseCompactObjectHeaders");
3101     FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
3102   }
3103   if (UseCompactObjectHeaders && FLAG_IS_CMDLINE(UseCompressedClassPointers) && !UseCompressedClassPointers) {
3104     warning("Compact object headers require compressed class pointers. Disabling compact object headers.");
3105     FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
3106   }
3107   if (UseCompactObjectHeaders && LockingMode == LM_LEGACY) {
3108     FLAG_SET_DEFAULT(LockingMode, LM_LIGHTWEIGHT);
3109   }
3110   if (UseCompactObjectHeaders && !UseAltGCForwarding) {
3111     FLAG_SET_DEFAULT(UseAltGCForwarding, true);
3112   }
3113   if (UseCompactObjectHeaders && !UseCompressedClassPointers) {
3114     FLAG_SET_DEFAULT(UseCompressedClassPointers, true);
3115   }
3116 #endif
3117 
3118   return JNI_OK;
3119 }
3120 
3121 // Helper class for controlling the lifetime of JavaVMInitArgs
3122 // objects.  The contents of the JavaVMInitArgs are guaranteed to be
3123 // deleted on the destruction of the ScopedVMInitArgs object.
3124 class ScopedVMInitArgs : public StackObj {
3125  private:
3126   JavaVMInitArgs _args;
3127   char*          _container_name;
3128   bool           _is_set;
3129   char*          _vm_options_file_arg;
3130 
3131  public:
3132   ScopedVMInitArgs(const char *container_name) {
3133     _args.version = JNI_VERSION_1_2;
3134     _args.nOptions = 0;
3135     _args.options = nullptr;
3136     _args.ignoreUnrecognized = false;
3137     _container_name = (char *)container_name;
< prev index next >