comparison src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp @ 3979:4dfb2df418f2

6484982: G1: process references during evacuation pauses Summary: G1 now uses two reference processors - one is used by concurrent marking and the other is used by STW GCs (both full and incremental evacuation pauses). In an evacuation pause, the reference processor is embedded into the closures used to scan objects. Doing so causes causes reference objects to be 'discovered' by the reference processor. At the end of the evacuation pause, these discovered reference objects are processed - preserving (and copying) referent objects (and their reachable graphs) as appropriate. Reviewed-by: ysr, jwilhelm, brutisso, stefank, tonyp
author johnc
date Thu, 22 Sep 2011 10:57:37 -0700
parents 78542e2b5e35
children bca17e38de00
comparison
equal deleted inserted replaced
3978:f0ecbe78fc7b 3979:4dfb2df418f2
348 } else if (ZapUnusedHeapArea) { 348 } else if (ZapUnusedHeapArea) {
349 young_gen->to_space()->mangle_unused_area(); 349 young_gen->to_space()->mangle_unused_area();
350 } 350 }
351 save_to_space_top_before_gc(); 351 save_to_space_top_before_gc();
352 352
353 NOT_PRODUCT(reference_processor()->verify_no_references_recorded());
354 COMPILER2_PRESENT(DerivedPointerTable::clear()); 353 COMPILER2_PRESENT(DerivedPointerTable::clear());
355 354
356 reference_processor()->enable_discovery(); 355 reference_processor()->enable_discovery(true /*verify_disabled*/, true /*verify_no_refs*/);
357 reference_processor()->setup_policy(false); 356 reference_processor()->setup_policy(false);
358 357
359 // We track how much was promoted to the next generation for 358 // We track how much was promoted to the next generation for
360 // the AdaptiveSizePolicy. 359 // the AdaptiveSizePolicy.
361 size_t old_gen_used_before = old_gen->used_in_bytes(); 360 size_t old_gen_used_before = old_gen->used_in_bytes();