Print this page
rev 3905 : 8001424: G1: Rename certain G1-specific flags
Summary: Rename G1DefaultMinNewGenPercent, G1DefaultMaxNewGenPercent, and G1OldCSetRegionLiveThresholdPercent to G1NewSizePercent, G1MaxNewSizePercent, and G1MixedGCLiveThresholdPercent respectively. Continue, however, to accept the previous names. If both are specified, the new name takes precedence.
Reviewed-by:

Split Close
Expand all
Collapse all
          --- old/src/share/vm/runtime/arguments.cpp
          +++ new/src/share/vm/runtime/arguments.cpp
↓ open down ↓ 1509 lines elided ↑ open up ↑
1510 1510    if (FLAG_IS_DEFAULT(GCTimeRatio) || GCTimeRatio == 0) {
1511 1511      // In G1, we want the default GC overhead goal to be higher than
1512 1512      // say in PS. So we set it here to 10%. Otherwise the heap might
1513 1513      // be expanded more aggressively than we would like it to. In
1514 1514      // fact, even 10% seems to not be high enough in some cases
1515 1515      // (especially small GC stress tests that the main thing they do
1516 1516      // is allocation). We might consider increase it further.
1517 1517      FLAG_SET_DEFAULT(GCTimeRatio, 9);
1518 1518    }
1519 1519  
     1520 +#ifndef SERIALGC
     1521 +  // The following flag names have been replaced. Accept the previous
     1522 +  // name for a short while, but set the new flag to the value set
     1523 +  // by the user. New flag names take precedence though.
     1524 +  if (FLAG_IS_DEFAULT(G1NewSizePercent) && G1DefaultMinNewGenPercent > 0) {
     1525 +    FLAG_SET_CMDLINE(uintx, G1NewSizePercent, G1DefaultMinNewGenPercent);
     1526 +  }
     1527 +  if (FLAG_IS_DEFAULT(G1MaxNewSizePercent) && G1DefaultMaxNewGenPercent > 0) {
     1528 +    FLAG_SET_CMDLINE(uintx, G1MaxNewSizePercent, G1DefaultMaxNewGenPercent);
     1529 +  }
     1530 +  if (FLAG_IS_DEFAULT(G1MixedGCLiveThresholdPercent) &&
     1531 +      G1OldCSetRegionLiveThresholdPercent > 0) {
     1532 +    FLAG_SET_CMDLINE(uintx, G1MaxNewSizePercent, G1OldCSetRegionLiveThresholdPercent);
     1533 +  }
     1534 +#endif
     1535 +
1520 1536    if (PrintGCDetails && Verbose) {
1521 1537      tty->print_cr("MarkStackSize: %uk  MarkStackSizeMax: %uk",
1522 1538        MarkStackSize / K, MarkStackSizeMax / K);
1523 1539      tty->print_cr("ConcGCThreads: %u", ConcGCThreads);
1524 1540    }
1525 1541  }
1526 1542  
1527 1543  void Arguments::set_heap_size() {
1528 1544    if (!FLAG_IS_DEFAULT(DefaultMaxRAMFraction)) {
1529 1545      // Deprecated flag
↓ open down ↓ 1995 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX