< prev index next >

src/hotspot/share/runtime/arguments.cpp

Print this page

3136   }
3137 
3138   if (ArchiveClassesAtExit == NULL && !RecordDynamicDumpInfo) {
3139     FLAG_SET_DEFAULT(DynamicDumpSharedSpaces, false);
3140   } else {
3141     FLAG_SET_DEFAULT(DynamicDumpSharedSpaces, true);
3142   }
3143 
3144   if (UseSharedSpaces && patch_mod_javabase) {
3145     no_shared_spaces("CDS is disabled when " JAVA_BASE_NAME " module is patched.");
3146   }
3147   if (UseSharedSpaces && !DumpSharedSpaces && check_unsupported_cds_runtime_properties()) {
3148     FLAG_SET_DEFAULT(UseSharedSpaces, false);
3149   }
3150 #endif
3151 
3152 #ifndef CAN_SHOW_REGISTERS_ON_ASSERT
3153   UNSUPPORTED_OPTION(ShowRegistersOnAssert);
3154 #endif // CAN_SHOW_REGISTERS_ON_ASSERT
3155 




















3156   return JNI_OK;
3157 }
3158 
3159 // Helper class for controlling the lifetime of JavaVMInitArgs
3160 // objects.  The contents of the JavaVMInitArgs are guaranteed to be
3161 // deleted on the destruction of the ScopedVMInitArgs object.
3162 class ScopedVMInitArgs : public StackObj {
3163  private:
3164   JavaVMInitArgs _args;
3165   char*          _container_name;
3166   bool           _is_set;
3167   char*          _vm_options_file_arg;
3168 
3169  public:
3170   ScopedVMInitArgs(const char *container_name) {
3171     _args.version = JNI_VERSION_1_2;
3172     _args.nOptions = 0;
3173     _args.options = NULL;
3174     _args.ignoreUnrecognized = false;
3175     _container_name = (char *)container_name;

3136   }
3137 
3138   if (ArchiveClassesAtExit == NULL && !RecordDynamicDumpInfo) {
3139     FLAG_SET_DEFAULT(DynamicDumpSharedSpaces, false);
3140   } else {
3141     FLAG_SET_DEFAULT(DynamicDumpSharedSpaces, true);
3142   }
3143 
3144   if (UseSharedSpaces && patch_mod_javabase) {
3145     no_shared_spaces("CDS is disabled when " JAVA_BASE_NAME " module is patched.");
3146   }
3147   if (UseSharedSpaces && !DumpSharedSpaces && check_unsupported_cds_runtime_properties()) {
3148     FLAG_SET_DEFAULT(UseSharedSpaces, false);
3149   }
3150 #endif
3151 
3152 #ifndef CAN_SHOW_REGISTERS_ON_ASSERT
3153   UNSUPPORTED_OPTION(ShowRegistersOnAssert);
3154 #endif // CAN_SHOW_REGISTERS_ON_ASSERT
3155 
3156 #ifdef _LP64
3157   if (UseCompactObjectHeaders && FLAG_IS_CMDLINE(UseCompressedClassPointers) && !UseCompressedClassPointers) {
3158     // If user specifies -UseCompressedClassPointers, disable compact headers with a warning.
3159     warning("Compact object headers require compressed class pointers. Disabling compact object headers.");
3160     FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
3161   }
3162   if (UseCompactObjectHeaders) {
3163     if (!UseFastLocking) {
3164       // Lilliput requires fast-locking.
3165       FLAG_SET_DEFAULT(UseFastLocking, true);
3166     }
3167     if (UseBiasedLocking) {
3168       FLAG_SET_DEFAULT(UseBiasedLocking, false);
3169     }
3170   }
3171   if (!UseCompactObjectHeaders) {
3172     FLAG_SET_DEFAULT(UseSharedSpaces, false);
3173   }
3174 #endif
3175 
3176   return JNI_OK;
3177 }
3178 
3179 // Helper class for controlling the lifetime of JavaVMInitArgs
3180 // objects.  The contents of the JavaVMInitArgs are guaranteed to be
3181 // deleted on the destruction of the ScopedVMInitArgs object.
3182 class ScopedVMInitArgs : public StackObj {
3183  private:
3184   JavaVMInitArgs _args;
3185   char*          _container_name;
3186   bool           _is_set;
3187   char*          _vm_options_file_arg;
3188 
3189  public:
3190   ScopedVMInitArgs(const char *container_name) {
3191     _args.version = JNI_VERSION_1_2;
3192     _args.nOptions = 0;
3193     _args.options = NULL;
3194     _args.ignoreUnrecognized = false;
3195     _container_name = (char *)container_name;
< prev index next >