< prev index next >

src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp

Print this page

 75   } else {
 76     return JVMFlag::SUCCESS;
 77   }
 78 }
 79 
 80 JVMFlag::Error VMPageSizeConstraintFunc(uintx value, bool verbose) {
 81   uintx min = (uintx)os::vm_page_size();
 82   if (value < min) {
 83     JVMFlag::printError(verbose,
 84                         "%s %s=" UINTX_FORMAT " is outside the allowed range [ " UINTX_FORMAT
 85                         " ... " UINTX_FORMAT " ]\n",
 86                         JVMFlagLimit::last_checked_flag()->type_string(),
 87                         JVMFlagLimit::last_checked_flag()->name(),
 88                         value, min, max_uintx);
 89     return JVMFlag::VIOLATES_CONSTRAINT;
 90   }
 91 
 92   return JVMFlag::SUCCESS;
 93 }
 94 












 95 JVMFlag::Error NUMAInterleaveGranularityConstraintFunc(size_t value, bool verbose) {
 96   size_t min = os::vm_allocation_granularity();
 97   size_t max = NOT_LP64(2*G) LP64_ONLY(8192*G);
 98 
 99   if (value < min || value > max) {
100     JVMFlag::printError(verbose,
101                         "size_t NUMAInterleaveGranularity=" UINTX_FORMAT " is outside the allowed range [ " UINTX_FORMAT
102                         " ... " UINTX_FORMAT " ]\n", value, min, max);
103     return JVMFlag::VIOLATES_CONSTRAINT;
104   }
105 
106   return JVMFlag::SUCCESS;
107 }

 75   } else {
 76     return JVMFlag::SUCCESS;
 77   }
 78 }
 79 
 80 JVMFlag::Error VMPageSizeConstraintFunc(uintx value, bool verbose) {
 81   uintx min = (uintx)os::vm_page_size();
 82   if (value < min) {
 83     JVMFlag::printError(verbose,
 84                         "%s %s=" UINTX_FORMAT " is outside the allowed range [ " UINTX_FORMAT
 85                         " ... " UINTX_FORMAT " ]\n",
 86                         JVMFlagLimit::last_checked_flag()->type_string(),
 87                         JVMFlagLimit::last_checked_flag()->name(),
 88                         value, min, max_uintx);
 89     return JVMFlag::VIOLATES_CONSTRAINT;
 90   }
 91 
 92   return JVMFlag::SUCCESS;
 93 }
 94 
 95 JVMFlag::Error ScopeLocalCacheSizeConstraintFunc(intx value, bool verbose) {
 96   if (!is_power_of_2(value)) {
 97     JVMFlag::printError(verbose,
 98                         "ScopeLocalCacheSize (" INTX_FORMAT ") must be "
 99                         "power of 2\n",
100                         value);
101     return JVMFlag::VIOLATES_CONSTRAINT;
102   }
103 
104   return JVMFlag::SUCCESS;
105 }
106 
107 JVMFlag::Error NUMAInterleaveGranularityConstraintFunc(size_t value, bool verbose) {
108   size_t min = os::vm_allocation_granularity();
109   size_t max = NOT_LP64(2*G) LP64_ONLY(8192*G);
110 
111   if (value < min || value > max) {
112     JVMFlag::printError(verbose,
113                         "size_t NUMAInterleaveGranularity=" UINTX_FORMAT " is outside the allowed range [ " UINTX_FORMAT
114                         " ... " UINTX_FORMAT " ]\n", value, min, max);
115     return JVMFlag::VIOLATES_CONSTRAINT;
116   }
117 
118   return JVMFlag::SUCCESS;
119 }
< prev index next >