1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.cpp Thu Sep 16 13:45:55 2010 -0700 1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.cpp Mon Sep 20 14:38:38 2010 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -39,7 +39,7 @@ 1.11 if (_generations == NULL) 1.12 vm_exit_during_initialization("Unable to allocate gen spec"); 1.13 1.14 - if (UseParNewGC && ParallelGCThreads > 0) { 1.15 + if (ParNewGeneration::in_use()) { 1.16 if (UseAdaptiveSizePolicy) { 1.17 _generations[0] = new GenerationSpec(Generation::ASParNew, 1.18 _initial_gen0_size, _max_gen0_size); 1.19 @@ -79,7 +79,7 @@ 1.20 1.21 void ConcurrentMarkSweepPolicy::initialize_gc_policy_counters() { 1.22 // initialize the policy counters - 2 collectors, 3 generations 1.23 - if (UseParNewGC && ParallelGCThreads > 0) { 1.24 + if (ParNewGeneration::in_use()) { 1.25 _gc_policy_counters = new GCPolicyCounters("ParNew:CMS", 2, 3); 1.26 } 1.27 else { 1.28 @@ -102,7 +102,7 @@ 1.29 1.30 assert(size_policy() != NULL, "A size policy is required"); 1.31 // initialize the policy counters - 2 collectors, 3 generations 1.32 - if (UseParNewGC && ParallelGCThreads > 0) { 1.33 + if (ParNewGeneration::in_use()) { 1.34 _gc_policy_counters = new CMSGCAdaptivePolicyCounters("ParNew:CMS", 2, 3, 1.35 size_policy()); 1.36 }