comparison src/share/vm/runtime/thread.cpp @ 1166:7b0e9cba0307

6896647: card marks can be deferred too long Summary: Deferred card marks are now flushed during the gc prologue. Parallel[Scavege,OldGC] and SerialGC no longer defer card marks generated by COMPILER2 as a result of ReduceInitialCardMarks. For these cases, introduced a diagnostic option to defer the card marks, only for the purposes of testing and diagnostics. CMS and G1 continue to defer card marks. Potential performance concern related to single-threaded flushing of deferred card marks in the gc prologue will be addressed in the future. Reviewed-by: never, johnc
author ysr
date Wed, 13 Jan 2010 15:26:39 -0800
parents 9b9c1ee9b3f6
children 6deeaebad47a
comparison
equal deleted inserted replaced
1165:2dd52dea6d28 1166:7b0e9cba0307
2355 } 2355 }
2356 } 2356 }
2357 }; 2357 };
2358 2358
2359 void JavaThread::oops_do(OopClosure* f, CodeBlobClosure* cf) { 2359 void JavaThread::oops_do(OopClosure* f, CodeBlobClosure* cf) {
2360 // Flush deferred store-barriers, if any, associated with 2360 // Verify that the deferred card marks have been flushed.
2361 // initializing stores done by this JavaThread in the current epoch. 2361 assert(deferred_card_mark().is_empty(), "Should be empty during GC");
2362 Universe::heap()->flush_deferred_store_barrier(this);
2363 2362
2364 // The ThreadProfiler oops_do is done from FlatProfiler::oops_do 2363 // The ThreadProfiler oops_do is done from FlatProfiler::oops_do
2365 // since there may be more than one thread using each ThreadProfiler. 2364 // since there may be more than one thread using each ThreadProfiler.
2366 2365
2367 // Traverse the GCHandles 2366 // Traverse the GCHandles