# HG changeset patch # User jcoomes # Date 1309980487 25200 # Node ID 377345fb5fb5f53788e9441ab2c4390db26db07a # Parent 7a7afd35144421aea5d6bf4e833a64e63d8002c5 7061204: clean the chunk table synchronously in embedded builds Reviewed-by: dholmes, never, jwilhelm, kvn diff -r 7a7afd351444 -r 377345fb5fb5 hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Wed Jul 06 12:22:29 2011 -0700 +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Wed Jul 06 12:28:07 2011 -0700 @@ -2716,6 +2716,10 @@ bitMapLock()->unlock(); releaseFreelistLocks(); + if (!CleanChunkPoolAsync) { + Chunk::clean_chunk_pool(); + } + _between_prologue_and_epilogue = false; // ready for next cycle } diff -r 7a7afd351444 -r 377345fb5fb5 hotspot/src/share/vm/memory/defNewGeneration.cpp --- a/hotspot/src/share/vm/memory/defNewGeneration.cpp Wed Jul 06 12:22:29 2011 -0700 +++ b/hotspot/src/share/vm/memory/defNewGeneration.cpp Wed Jul 06 12:28:07 2011 -0700 @@ -905,6 +905,10 @@ to()->check_mangled_unused_area_complete(); } + if (!CleanChunkPoolAsync) { + Chunk::clean_chunk_pool(); + } + // update the generation and space performance counters update_counters(); gch->collector_policy()->counters()->update_counters(); diff -r 7a7afd351444 -r 377345fb5fb5 hotspot/src/share/vm/memory/genCollectedHeap.cpp --- a/hotspot/src/share/vm/memory/genCollectedHeap.cpp Wed Jul 06 12:22:29 2011 -0700 +++ b/hotspot/src/share/vm/memory/genCollectedHeap.cpp Wed Jul 06 12:28:07 2011 -0700 @@ -1384,6 +1384,10 @@ generation_iterate(&blk, false); // not old-to-young. perm_gen()->gc_epilogue(full); + if (!CleanChunkPoolAsync) { + Chunk::clean_chunk_pool(); + } + always_do_update_barrier = UseConcMarkSweepGC; }; diff -r 7a7afd351444 -r 377345fb5fb5 hotspot/src/share/vm/runtime/globals.hpp --- a/hotspot/src/share/vm/runtime/globals.hpp Wed Jul 06 12:22:29 2011 -0700 +++ b/hotspot/src/share/vm/runtime/globals.hpp Wed Jul 06 12:28:07 2011 -0700 @@ -444,6 +444,9 @@ product(bool, UsePPCLWSYNC, true, \ "Use lwsync instruction if true, else use slower sync") \ \ + develop(bool, CleanChunkPoolAsync, falseInEmbedded, \ + "Whether to clean the chunk pool asynchronously") \ + \ /* Temporary: See 6948537 */ \ experimental(bool, UseMemSetInBOT, true, \ "(Unstable) uses memset in BOT updates in GC code") \ diff -r 7a7afd351444 -r 377345fb5fb5 hotspot/src/share/vm/runtime/thread.cpp --- a/hotspot/src/share/vm/runtime/thread.cpp Wed Jul 06 12:22:29 2011 -0700 +++ b/hotspot/src/share/vm/runtime/thread.cpp Wed Jul 06 12:28:07 2011 -0700 @@ -3347,7 +3347,9 @@ // Notify JVMTI agents that VM initialization is complete - nop if no agents. JvmtiExport::post_vm_initialized(); - Chunk::start_chunk_pool_cleaner_task(); + if (CleanChunkPoolAsync) { + Chunk::start_chunk_pool_cleaner_task(); + } // initialize compiler(s) CompileBroker::compilation_init();