comparison src/share/vm/runtime/arguments.cpp @ 2366:1fb790245268

6820066: Check that -XX:ParGCArrayScanChunk has a value larger than zero. Summary: Check that -XX:ParGCArrayScanChunk has a value larger than zero. Reviewed-by: johnc, jmasa, ysr
author jwilhelm
date Fri, 11 Mar 2011 16:35:18 +0100
parents a2c2eac1ca62
children dde920245681
comparison
equal deleted inserted replaced
2364:04d1138b4cce 2366:1fb790245268
1666 name, val, min, max); 1666 name, val, min, max);
1667 return false; 1667 return false;
1668 } 1668 }
1669 1669
1670 bool Arguments::verify_min_value(intx val, intx min, const char* name) { 1670 bool Arguments::verify_min_value(intx val, intx min, const char* name) {
1671 // Returns true if given value is greater than specified min threshold 1671 // Returns true if given value is at least specified min threshold
1672 // false, otherwise. 1672 // false, otherwise.
1673 if (val >= min ) { 1673 if (val >= min ) {
1674 return true; 1674 return true;
1675 } 1675 }
1676 jio_fprintf(defaultStream::error_stream(), 1676 jio_fprintf(defaultStream::error_stream(),
1677 "%s of " INTX_FORMAT " is invalid; must be greater than " INTX_FORMAT "\n", 1677 "%s of " INTX_FORMAT " is invalid; must be at least " INTX_FORMAT "\n",
1678 name, val, min); 1678 name, val, min);
1679 return false; 1679 return false;
1680 } 1680 }
1681 1681
1682 bool Arguments::verify_percentage(uintx value, const char* name) { 1682 bool Arguments::verify_percentage(uintx value, const char* name) {
1898 jio_fprintf(defaultStream::error_stream(), 1898 jio_fprintf(defaultStream::error_stream(),
1899 "error: +ExplictGCInvokesConcurrent[AndUnloadsClasses] conflicts" 1899 "error: +ExplictGCInvokesConcurrent[AndUnloadsClasses] conflicts"
1900 " with -UseAsyncConcMarkSweepGC"); 1900 " with -UseAsyncConcMarkSweepGC");
1901 status = false; 1901 status = false;
1902 } 1902 }
1903
1904 status = status && verify_min_value(ParGCArrayScanChunk, 1, "ParGCArrayScanChunk");
1903 1905
1904 #ifndef SERIALGC 1906 #ifndef SERIALGC
1905 if (UseG1GC) { 1907 if (UseG1GC) {
1906 status = status && verify_percentage(InitiatingHeapOccupancyPercent, 1908 status = status && verify_percentage(InitiatingHeapOccupancyPercent,
1907 "InitiatingHeapOccupancyPercent"); 1909 "InitiatingHeapOccupancyPercent");