src/share/vm/runtime/arguments.cpp

Print this page
rev 3618 : 7193946: Move warnings associated with UseMemSetInBOT flag
Summary: The warnings associated with the UseMemSetInBOT flag are duplicated in CMS and G1. The separate warnings have been removed and single instance of the warning has been placed in a common location.
Reviewed-by:


3240   }
3241 
3242   // Apply CPU specific policy for the BiasedLocking
3243   if (UseBiasedLocking) {
3244     if (!VM_Version::use_biased_locking() &&
3245         !(FLAG_IS_CMDLINE(UseBiasedLocking))) {
3246       UseBiasedLocking = false;
3247     }
3248   }
3249 
3250   // set PauseAtExit if the gamma launcher was used and a debugger is attached
3251   // but only if not already set on the commandline
3252   if (Arguments::created_by_gamma_launcher() && os::is_debugger_attached()) {
3253     bool set = false;
3254     CommandLineFlags::wasSetOnCmdline("PauseAtExit", &set);
3255     if (!set) {
3256       FLAG_SET_DEFAULT(PauseAtExit, true);
3257     }
3258   }
3259 













3260   return JNI_OK;
3261 }
3262 
3263 int Arguments::PropertyList_count(SystemProperty* pl) {
3264   int count = 0;
3265   while(pl != NULL) {
3266     count++;
3267     pl = pl->next();
3268   }
3269   return count;
3270 }
3271 
3272 const char* Arguments::PropertyList_get_value(SystemProperty *pl, const char* key) {
3273   assert(key != NULL, "just checking");
3274   SystemProperty* prop;
3275   for (prop = pl; prop != NULL; prop = prop->next()) {
3276     if (strcmp(key, prop->key()) == 0) return prop->value();
3277   }
3278   return NULL;
3279 }




3240   }
3241 
3242   // Apply CPU specific policy for the BiasedLocking
3243   if (UseBiasedLocking) {
3244     if (!VM_Version::use_biased_locking() &&
3245         !(FLAG_IS_CMDLINE(UseBiasedLocking))) {
3246       UseBiasedLocking = false;
3247     }
3248   }
3249 
3250   // set PauseAtExit if the gamma launcher was used and a debugger is attached
3251   // but only if not already set on the commandline
3252   if (Arguments::created_by_gamma_launcher() && os::is_debugger_attached()) {
3253     bool set = false;
3254     CommandLineFlags::wasSetOnCmdline("PauseAtExit", &set);
3255     if (!set) {
3256       FLAG_SET_DEFAULT(PauseAtExit, true);
3257     }
3258   }
3259 
3260 #ifdef SPARC
3261   if (UseConcMarkSweepGC || UseG1GC) {
3262     // Issue a stern warning if the user has explicitly set
3263     // UseMemSetInBOT (it is known to cause issues), but allow
3264     // use for experimentation and debugging.
3265     if (VM_Version::is_sun4v() && UseMemSetInBOT) {
3266       assert(!FLAG_IS_DEFAULT(UseMemSetInBOT), "Error");
3267       warning("Experimental flag -XX:+UseMemSetInBOT is known to cause instability"
3268           " on sun4v; please understand that you are using at your own risk!");
3269     }
3270   }
3271 #endif // SPARC
3272 
3273   return JNI_OK;
3274 }
3275 
3276 int Arguments::PropertyList_count(SystemProperty* pl) {
3277   int count = 0;
3278   while(pl != NULL) {
3279     count++;
3280     pl = pl->next();
3281   }
3282   return count;
3283 }
3284 
3285 const char* Arguments::PropertyList_get_value(SystemProperty *pl, const char* key) {
3286   assert(key != NULL, "just checking");
3287   SystemProperty* prop;
3288   for (prop = pl; prop != NULL; prop = prop->next()) {
3289     if (strcmp(key, prop->key()) == 0) return prop->value();
3290   }
3291   return NULL;
3292 }