comparison src/share/vm/runtime/arguments.cpp @ 1745:ebfb7c68865e

Merge
author dcubed
date Mon, 23 Aug 2010 08:44:03 -0700
parents ee5cc9e78493 f8c5d1bdaad4
children 14197af1010e 6ee479178066
comparison
equal deleted inserted replaced
1736:b0b9d64ed9bc 1745:ebfb7c68865e
1559 " and " UINTX_FORMAT "\n", 1559 " and " UINTX_FORMAT "\n",
1560 name, val, min, max); 1560 name, val, min, max);
1561 return false; 1561 return false;
1562 } 1562 }
1563 1563
1564 bool Arguments::verify_min_value(intx val, intx min, const char* name) {
1565 // Returns true if given value is greater than specified min threshold
1566 // false, otherwise.
1567 if (val >= min ) {
1568 return true;
1569 }
1570 jio_fprintf(defaultStream::error_stream(),
1571 "%s of " INTX_FORMAT " is invalid; must be greater than " INTX_FORMAT "\n",
1572 name, val, min);
1573 return false;
1574 }
1575
1564 bool Arguments::verify_percentage(uintx value, const char* name) { 1576 bool Arguments::verify_percentage(uintx value, const char* name) {
1565 if (value <= 100) { 1577 if (value <= 100) {
1566 return true; 1578 return true;
1567 } 1579 }
1568 jio_fprintf(defaultStream::error_stream(), 1580 jio_fprintf(defaultStream::error_stream(),
1611 } 1623 }
1612 1624
1613 return status; 1625 return status;
1614 } 1626 }
1615 1627
1628 // Check stack pages settings
1629 bool Arguments::check_stack_pages()
1630 {
1631 bool status = true;
1632 status = status && verify_min_value(StackYellowPages, 1, "StackYellowPages");
1633 status = status && verify_min_value(StackRedPages, 1, "StackRedPages");
1634 status = status && verify_min_value(StackShadowPages, 1, "StackShadowPages");
1635 return status;
1636 }
1637
1616 // Check the consistency of vm_init_args 1638 // Check the consistency of vm_init_args
1617 bool Arguments::check_vm_args_consistency() { 1639 bool Arguments::check_vm_args_consistency() {
1618 // Method for adding checks for flag consistency. 1640 // Method for adding checks for flag consistency.
1619 // The intent is to warn the user of all possible conflicts, 1641 // The intent is to warn the user of all possible conflicts,
1620 // before returning an error. 1642 // before returning an error.
1723 } else if (UseLargePages && (UseSharedSpaces || DumpSharedSpaces)) { 1745 } else if (UseLargePages && (UseSharedSpaces || DumpSharedSpaces)) {
1724 FLAG_SET_DEFAULT(UseLargePages, false); 1746 FLAG_SET_DEFAULT(UseLargePages, false);
1725 } 1747 }
1726 1748
1727 status = status && check_gc_consistency(); 1749 status = status && check_gc_consistency();
1750 status = status && check_stack_pages();
1728 1751
1729 if (_has_alloc_profile) { 1752 if (_has_alloc_profile) {
1730 if (UseParallelGC || UseParallelOldGC) { 1753 if (UseParallelGC || UseParallelOldGC) {
1731 jio_fprintf(defaultStream::error_stream(), 1754 jio_fprintf(defaultStream::error_stream(),
1732 "error: invalid argument combination.\n" 1755 "error: invalid argument combination.\n"