From fbffd24fc5b7db6fdcbc9f73b07806ab77bdd293 Mon Sep 17 00:00:00 2001 From: Bengt Rutisson Date: Fri, 29 Apr 2011 09:11:03 +0200 Subject: [PATCH] 7040068: CMS: Possibly unsafe initialization of BlockOffsetArrayUseUnallocatedBlock BlockOffsetArrayUseUnallocatedBlock was intended to be turned off as part of BUG 6948538 but a code line in collectorPolicy.cpp actually kept it turned on. Reviewed-by: jwilhelm, ysr --- hotspot/src/share/vm/memory/collectorPolicy.cpp | 2 -- hotspot/src/share/vm/runtime/globals.hpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/hotspot/src/share/vm/memory/collectorPolicy.cpp b/hotspot/src/share/vm/memory/collectorPolicy.cpp index 61efdd80f7d..7ad2bebaf42 100644 --- a/hotspot/src/share/vm/memory/collectorPolicy.cpp +++ b/hotspot/src/share/vm/memory/collectorPolicy.cpp @@ -265,8 +265,6 @@ void TwoGenerationCollectorPolicy::initialize_flags() { MaxHeapSize = align_size_up(MaxHeapSize, max_alignment()); always_do_update_barrier = UseConcMarkSweepGC; - BlockOffsetArrayUseUnallocatedBlock = - BlockOffsetArrayUseUnallocatedBlock || ParallelGCThreads > 0; // Check validity of heap flags assert(OldSize % min_alignment() == 0, "old space alignment"); diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp index c16f8866056..59f8fb95a25 100644 --- a/hotspot/src/share/vm/runtime/globals.hpp +++ b/hotspot/src/share/vm/runtime/globals.hpp @@ -1824,7 +1824,7 @@ class CommandLineFlags { develop(bool, VerifyBlockOffsetArray, false, \ "Do (expensive!) block offset array verification") \ \ - product(bool, BlockOffsetArrayUseUnallocatedBlock, false, \ + diagnostic(bool, BlockOffsetArrayUseUnallocatedBlock, false, \ "Maintain _unallocated_block in BlockOffsetArray" \ " (currently applicable only to CMS collector)") \ \