Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.cpp @ 7451:ca0a78017dc7
8005396: Use ParNew with only one thread instead of DefNew as default for CMS on single CPU machines
Reviewed-by: jmasa, jcoomes
author | brutisso |
---|---|
date | Sun, 30 Dec 2012 08:47:52 +0100 |
parents | f34d701e952e |
children | 6f817ce50129 |
comparison
equal
deleted
inserted
replaced
7450:d275c3dc73e6 | 7451:ca0a78017dc7 |
---|---|
54 void ConcurrentMarkSweepPolicy::initialize_generations() { | 54 void ConcurrentMarkSweepPolicy::initialize_generations() { |
55 _generations = new GenerationSpecPtr[number_of_generations()]; | 55 _generations = new GenerationSpecPtr[number_of_generations()]; |
56 if (_generations == NULL) | 56 if (_generations == NULL) |
57 vm_exit_during_initialization("Unable to allocate gen spec"); | 57 vm_exit_during_initialization("Unable to allocate gen spec"); |
58 | 58 |
59 if (ParNewGeneration::in_use()) { | 59 if (UseParNewGC) { |
60 if (UseAdaptiveSizePolicy) { | 60 if (UseAdaptiveSizePolicy) { |
61 _generations[0] = new GenerationSpec(Generation::ASParNew, | 61 _generations[0] = new GenerationSpec(Generation::ASParNew, |
62 _initial_gen0_size, _max_gen0_size); | 62 _initial_gen0_size, _max_gen0_size); |
63 } else { | 63 } else { |
64 _generations[0] = new GenerationSpec(Generation::ParNew, | 64 _generations[0] = new GenerationSpec(Generation::ParNew, |
94 GCTimeRatio); | 94 GCTimeRatio); |
95 } | 95 } |
96 | 96 |
97 void ConcurrentMarkSweepPolicy::initialize_gc_policy_counters() { | 97 void ConcurrentMarkSweepPolicy::initialize_gc_policy_counters() { |
98 // initialize the policy counters - 2 collectors, 3 generations | 98 // initialize the policy counters - 2 collectors, 3 generations |
99 if (ParNewGeneration::in_use()) { | 99 if (UseParNewGC) { |
100 _gc_policy_counters = new GCPolicyCounters("ParNew:CMS", 2, 3); | 100 _gc_policy_counters = new GCPolicyCounters("ParNew:CMS", 2, 3); |
101 } | 101 } |
102 else { | 102 else { |
103 _gc_policy_counters = new GCPolicyCounters("Copy:CMS", 2, 3); | 103 _gc_policy_counters = new GCPolicyCounters("Copy:CMS", 2, 3); |
104 } | 104 } |
117 | 117 |
118 void ASConcurrentMarkSweepPolicy::initialize_gc_policy_counters() { | 118 void ASConcurrentMarkSweepPolicy::initialize_gc_policy_counters() { |
119 | 119 |
120 assert(size_policy() != NULL, "A size policy is required"); | 120 assert(size_policy() != NULL, "A size policy is required"); |
121 // initialize the policy counters - 2 collectors, 3 generations | 121 // initialize the policy counters - 2 collectors, 3 generations |
122 if (ParNewGeneration::in_use()) { | 122 if (UseParNewGC) { |
123 _gc_policy_counters = new CMSGCAdaptivePolicyCounters("ParNew:CMS", 2, 3, | 123 _gc_policy_counters = new CMSGCAdaptivePolicyCounters("ParNew:CMS", 2, 3, |
124 size_policy()); | 124 size_policy()); |
125 } | 125 } |
126 else { | 126 else { |
127 _gc_policy_counters = new CMSGCAdaptivePolicyCounters("Copy:CMS", 2, 3, | 127 _gc_policy_counters = new CMSGCAdaptivePolicyCounters("Copy:CMS", 2, 3, |