# HG changeset patch # User jcoomes # Date 1309980487 25200 # Node ID 48048b59a551ce0bf98002cbc11416177f6fff97 # Parent 65dba8692db728bea155c3683eb198329dd91afd 7061204: clean the chunk table synchronously in embedded builds Reviewed-by: dholmes, never, jwilhelm, kvn diff -r 65dba8692db7 -r 48048b59a551 src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp --- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Wed Jul 06 12:22:29 2011 -0700 +++ b/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 65dba8692db7 -r 48048b59a551 src/share/vm/memory/defNewGeneration.cpp --- a/src/share/vm/memory/defNewGeneration.cpp Wed Jul 06 12:22:29 2011 -0700 +++ b/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 65dba8692db7 -r 48048b59a551 src/share/vm/memory/genCollectedHeap.cpp --- a/src/share/vm/memory/genCollectedHeap.cpp Wed Jul 06 12:22:29 2011 -0700 +++ b/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 65dba8692db7 -r 48048b59a551 src/share/vm/runtime/globals.hpp --- a/src/share/vm/runtime/globals.hpp Wed Jul 06 12:22:29 2011 -0700 +++ b/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 65dba8692db7 -r 48048b59a551 src/share/vm/runtime/thread.cpp --- a/src/share/vm/runtime/thread.cpp Wed Jul 06 12:22:29 2011 -0700 +++ b/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();