comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 22294:d86b226e331a

Enable derived oop processing by the GC with JVMCI
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Tue, 21 Jul 2015 15:00:07 -0700
parents e13c65f874e5
children c28cb37b2e1d
comparison
equal deleted inserted replaced
22272:b6d504612b3f 22294:d86b226e331a
1331 verify_before_gc(); 1331 verify_before_gc();
1332 1332
1333 check_bitmaps("Full GC Start"); 1333 check_bitmaps("Full GC Start");
1334 pre_full_gc_dump(gc_timer); 1334 pre_full_gc_dump(gc_timer);
1335 1335
1336 COMPILER2_PRESENT(DerivedPointerTable::clear()); 1336 #if defined(COMPILER2) || defined(JVMCI)
1337 DerivedPointerTable::clear();
1338 #endif
1337 1339
1338 // Disable discovery and empty the discovered lists 1340 // Disable discovery and empty the discovered lists
1339 // for the CM ref processor. 1341 // for the CM ref processor.
1340 ref_processor_cm()->disable_discovery(); 1342 ref_processor_cm()->disable_discovery();
1341 ref_processor_cm()->abandon_partial_discovery(); 1343 ref_processor_cm()->abandon_partial_discovery();
1391 1393
1392 // Enqueue any discovered reference objects that have 1394 // Enqueue any discovered reference objects that have
1393 // not been removed from the discovered lists. 1395 // not been removed from the discovered lists.
1394 ref_processor_stw()->enqueue_discovered_references(); 1396 ref_processor_stw()->enqueue_discovered_references();
1395 1397
1396 COMPILER2_PRESENT(DerivedPointerTable::update_pointers()); 1398 #if defined(COMPILER2) || defined(JVMCI)
1399 DerivedPointerTable::update_pointers();
1400 #endif
1397 1401
1398 MemoryService::track_memory_usage(); 1402 MemoryService::track_memory_usage();
1399 1403
1400 assert(!ref_processor_stw()->discovery_enabled(), "Postcondition"); 1404 assert(!ref_processor_stw()->discovery_enabled(), "Postcondition");
1401 ref_processor_stw()->verify_no_references_recorded(); 1405 ref_processor_stw()->verify_no_references_recorded();
3601 } 3605 }
3602 3606
3603 // FIXME: what is this about? 3607 // FIXME: what is this about?
3604 // I'm ignoring the "fill_newgen()" call if "alloc_event_enabled" 3608 // I'm ignoring the "fill_newgen()" call if "alloc_event_enabled"
3605 // is set. 3609 // is set.
3606 COMPILER2_PRESENT(assert(DerivedPointerTable::is_empty(), 3610 #if defined(COMPILER2) || defined(JVMCI)
3607 "derived pointer present")); 3611 assert(DerivedPointerTable::is_empty(), "derived pointer present");
3612 #endif
3608 // always_do_update_barrier = true; 3613 // always_do_update_barrier = true;
3609 3614
3610 resize_all_tlabs(); 3615 resize_all_tlabs();
3611 allocation_context_stats().update(full); 3616 allocation_context_stats().update(full);
3612 3617
3936 increment_gc_time_stamp(); 3941 increment_gc_time_stamp();
3937 3942
3938 verify_before_gc(); 3943 verify_before_gc();
3939 check_bitmaps("GC Start"); 3944 check_bitmaps("GC Start");
3940 3945
3941 COMPILER2_PRESENT(DerivedPointerTable::clear()); 3946 #if defined(COMPILER2) || defined(JVMCI)
3947 DerivedPointerTable::clear();
3948 #endif
3942 3949
3943 // Please see comment in g1CollectedHeap.hpp and 3950 // Please see comment in g1CollectedHeap.hpp and
3944 // G1CollectedHeap::ref_processing_init() to see how 3951 // G1CollectedHeap::ref_processing_init() to see how
3945 // reference processing currently works in G1. 3952 // reference processing currently works in G1.
3946 3953
5987 // cards). We need these updates logged to update any 5994 // cards). We need these updates logged to update any
5988 // RSets. 5995 // RSets.
5989 enqueue_discovered_references(n_workers); 5996 enqueue_discovered_references(n_workers);
5990 5997
5991 redirty_logged_cards(); 5998 redirty_logged_cards();
5992 COMPILER2_PRESENT(DerivedPointerTable::update_pointers()); 5999 #if defined(COMPILER2) || defined(JVMCI)
6000 DerivedPointerTable::update_pointers();
6001 #endif
5993 } 6002 }
5994 6003
5995 void G1CollectedHeap::free_region(HeapRegion* hr, 6004 void G1CollectedHeap::free_region(HeapRegion* hr,
5996 FreeRegionList* free_list, 6005 FreeRegionList* free_list,
5997 bool par, 6006 bool par,