comparison src/share/vm/runtime/arguments.cpp @ 1764:14197af1010e

Merge
author never
date Fri, 27 Aug 2010 17:35:08 -0700
parents d6f45b55c972 ebfb7c68865e
children 40d7b43b6fe0 d5d065957597
comparison
equal deleted inserted replaced
1763:d6f45b55c972 1764:14197af1010e
1562 " and " UINTX_FORMAT "\n", 1562 " and " UINTX_FORMAT "\n",
1563 name, val, min, max); 1563 name, val, min, max);
1564 return false; 1564 return false;
1565 } 1565 }
1566 1566
1567 bool Arguments::verify_min_value(intx val, intx min, const char* name) {
1568 // Returns true if given value is greater than specified min threshold
1569 // false, otherwise.
1570 if (val >= min ) {
1571 return true;
1572 }
1573 jio_fprintf(defaultStream::error_stream(),
1574 "%s of " INTX_FORMAT " is invalid; must be greater than " INTX_FORMAT "\n",
1575 name, val, min);
1576 return false;
1577 }
1578
1567 bool Arguments::verify_percentage(uintx value, const char* name) { 1579 bool Arguments::verify_percentage(uintx value, const char* name) {
1568 if (value <= 100) { 1580 if (value <= 100) {
1569 return true; 1581 return true;
1570 } 1582 }
1571 jio_fprintf(defaultStream::error_stream(), 1583 jio_fprintf(defaultStream::error_stream(),
1614 } 1626 }
1615 1627
1616 return status; 1628 return status;
1617 } 1629 }
1618 1630
1631 // Check stack pages settings
1632 bool Arguments::check_stack_pages()
1633 {
1634 bool status = true;
1635 status = status && verify_min_value(StackYellowPages, 1, "StackYellowPages");
1636 status = status && verify_min_value(StackRedPages, 1, "StackRedPages");
1637 status = status && verify_min_value(StackShadowPages, 1, "StackShadowPages");
1638 return status;
1639 }
1640
1619 // Check the consistency of vm_init_args 1641 // Check the consistency of vm_init_args
1620 bool Arguments::check_vm_args_consistency() { 1642 bool Arguments::check_vm_args_consistency() {
1621 // Method for adding checks for flag consistency. 1643 // Method for adding checks for flag consistency.
1622 // The intent is to warn the user of all possible conflicts, 1644 // The intent is to warn the user of all possible conflicts,
1623 // before returning an error. 1645 // before returning an error.
1726 } else if (UseLargePages && (UseSharedSpaces || DumpSharedSpaces)) { 1748 } else if (UseLargePages && (UseSharedSpaces || DumpSharedSpaces)) {
1727 FLAG_SET_DEFAULT(UseLargePages, false); 1749 FLAG_SET_DEFAULT(UseLargePages, false);
1728 } 1750 }
1729 1751
1730 status = status && check_gc_consistency(); 1752 status = status && check_gc_consistency();
1753 status = status && check_stack_pages();
1731 1754
1732 if (_has_alloc_profile) { 1755 if (_has_alloc_profile) {
1733 if (UseParallelGC || UseParallelOldGC) { 1756 if (UseParallelGC || UseParallelOldGC) {
1734 jio_fprintf(defaultStream::error_stream(), 1757 jio_fprintf(defaultStream::error_stream(),
1735 "error: invalid argument combination.\n" 1758 "error: invalid argument combination.\n"