Print this page
rev 7124 : 8073944: Simplify ArgumentsExt and remove unneeded functionallity
Reviewed-by: kbarrett, dholmes

Split Split Close
Expand all
Collapse all
          --- old/hotspot/src/share/vm/runtime/arguments.cpp
          +++ new/hotspot/src/share/vm/runtime/arguments.cpp
↓ open down ↓ 1564 lines elided ↑ open up ↑
1565 1565      if (should_auto_select_low_pause_collector()) {
1566 1566        FLAG_SET_ERGO(bool, UseConcMarkSweepGC, true);
1567 1567      } else {
1568 1568        FLAG_SET_ERGO(bool, UseParallelGC, true);
1569 1569      }
1570 1570    }
1571 1571  }
1572 1572  
1573 1573  void Arguments::select_gc() {
1574 1574    if (!gc_selected()) {
1575      -    ArgumentsExt::select_gc_ergonomically();
     1575 +    select_gc_ergonomically();
1576 1576    }
1577 1577  }
1578 1578  
1579 1579  void Arguments::set_ergonomics_flags() {
1580 1580    select_gc();
1581 1581  
1582 1582  #ifdef COMPILER2
1583 1583    // Shared spaces work fine with other GCs but causes bytecode rewriting
1584 1584    // to be disabled, which hurts interpreter performance and decreases
1585 1585    // server performance.  When -server is specified, keep the default off
↓ open down ↓ 474 lines elided ↑ open up ↑
2060 2060                    "equal to MinHeapFreeRatio (" UINTX_FORMAT ")", max_heap_free_ratio,
2061 2061                    MinHeapFreeRatio);
2062 2062      return false;
2063 2063    }
2064 2064    // This does not set the flag itself, but stores the value in a safe place for later usage.
2065 2065    _max_heap_free_ratio = max_heap_free_ratio;
2066 2066    return true;
2067 2067  }
2068 2068  
2069 2069  // Check consistency of GC selection
2070      -bool Arguments::check_gc_consistency_user() {
     2070 +bool Arguments::check_gc_consistency() {
2071 2071    check_gclog_consistency();
2072 2072    bool status = true;
2073 2073    // Ensure that the user has not selected conflicting sets
2074 2074    // of collectors. [Note: this check is merely a user convenience;
2075 2075    // collectors over-ride each other so that only a non-conflicting
2076 2076    // set is selected; however what the user gets is not what they
2077 2077    // may have expected from the combination they asked for. It's
2078 2078    // better to reduce user confusion by not allowing them to
2079 2079    // select conflicting combinations.
2080 2080    uint i = 0;
↓ open down ↓ 145 lines elided ↑ open up ↑
2226 2226      }
2227 2227    }
2228 2228  
2229 2229    status = status && verify_percentage(GCHeapFreeLimit, "GCHeapFreeLimit");
2230 2230    status = status && verify_percentage(GCTimeLimit, "GCTimeLimit");
2231 2231    if (GCTimeLimit == 100) {
2232 2232      // Turn off gc-overhead-limit-exceeded checks
2233 2233      FLAG_SET_DEFAULT(UseGCOverheadLimit, false);
2234 2234    }
2235 2235  
2236      -  status = status && check_gc_consistency_user();
     2236 +  status = status && check_gc_consistency();
2237 2237    status = status && check_stack_pages();
2238 2238  
2239 2239    if (CMSIncrementalMode) {
2240 2240      if (!UseConcMarkSweepGC) {
2241 2241        jio_fprintf(defaultStream::error_stream(),
2242 2242                    "error:  invalid argument combination.\n"
2243 2243                    "The CMS collector (-XX:+UseConcMarkSweepGC) must be "
2244 2244                    "selected in order\nto use CMSIncrementalMode.\n");
2245 2245        status = false;
2246 2246      } else {
↓ open down ↓ 1752 lines elided ↑ open up ↑
3999 3999  }
4000 4000  
4001 4001  jint Arguments::apply_ergo() {
4002 4002  
4003 4003    // Set flags based on ergonomics.
4004 4004    set_ergonomics_flags();
4005 4005  
4006 4006    set_shared_spaces_flags();
4007 4007  
4008 4008    // Check the GC selections again.
4009      -  if (!ArgumentsExt::check_gc_consistency_ergo()) {
     4009 +  if (!check_gc_consistency()) {
4010 4010      return JNI_EINVAL;
4011 4011    }
4012 4012  
4013 4013    if (TieredCompilation) {
4014 4014      set_tiered_flags();
4015 4015    } else {
4016 4016      // Check if the policy is valid. Policies 0 and 1 are valid for non-tiered setup.
4017 4017      if (CompilationPolicyChoice >= 2) {
4018 4018        vm_exit_during_initialization(
4019 4019          "Incompatible compilation policy selected", NULL);
↓ open down ↓ 289 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX