< prev index next >

src/hotspot/share/runtime/arguments.cpp

Print this page

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

















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

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