--- old/src/share/vm/gc/g1/g1RemSet.hpp 2017-06-23 11:37:45.315188724 +0200 +++ new/src/share/vm/gc/g1/g1RemSet.hpp 2017-06-23 11:37:45.187184770 +0200 @@ -41,10 +41,12 @@ class CodeBlobClosure; class G1CollectedHeap; class G1HotCardCache; -class G1ParPushHeapRSClosure; class G1RemSetScanState; +class G1ParScanThreadState; class G1Policy; class G1SATBCardTableModRefBS; +class G1ScanObjsDuringScanRSClosure; +class G1ScanObjsDuringUpdateRSClosure; class HeapRegionClaimer; // A G1RemSet in which each heap region has a rem set that records the @@ -94,21 +96,12 @@ G1HotCardCache* hot_card_cache); ~G1RemSet(); - // Invoke "cl->do_oop" on all pointers into the collection set - // from objects in regions outside the collection set (having - // invoked "cl->set_region" to set the "from" region correctly - // beforehand.) + // Process all oops in the collection set from the cards in the refinement buffers and + // remembered sets using pss. // - // Apply non_heap_roots on the oops of the unmarked nmethods - // on the strong code roots list for each region in the - // collection set. - // - // The "worker_i" param is for the parallel case where the id - // of the worker thread calling this function can be helpful in - // partitioning the work to be done. It should be the same as - // the "i" passed to the calling thread's work(i) function. - // In the sequential case this param will be ignored. - void oops_into_collection_set_do(G1ParPushHeapRSClosure* cl, + // Further applies heap_region_codeblobs on the oops of the unmarked nmethods on the strong code + // roots list for each region in the collection set. + void oops_into_collection_set_do(G1ParScanThreadState* pss, CodeBlobClosure* heap_region_codeblobs, uint worker_i); @@ -120,7 +113,7 @@ void prepare_for_oops_into_collection_set_do(); void cleanup_after_oops_into_collection_set_do(); - void scan_rem_set(G1ParPushHeapRSClosure* oops_in_heap_closure, + void scan_rem_set(G1ScanObjsDuringScanRSClosure* oops_in_heap_closure, CodeBlobClosure* heap_region_codeblobs, uint worker_i); @@ -128,7 +121,7 @@ // Flush remaining refinement buffers into the remembered set, // applying oops_in_heap_closure on the references found. - void update_rem_set(DirtyCardQueue* into_cset_dcq, G1ParPushHeapRSClosure* oops_in_heap_closure, uint worker_i); + void update_rem_set(DirtyCardQueue* into_cset_dcq, G1ScanObjsDuringUpdateRSClosure* oops_in_heap_closure, uint worker_i); // Record, if necessary, the fact that *p (where "p" is in region "from", // which is required to be non-NULL) has changed to a new non-NULL value. @@ -149,8 +142,7 @@ // Refine the card corresponding to "card_ptr". Returns "true" if the given card contains // oops that have references into the current collection set. bool refine_card_during_gc(jbyte* card_ptr, - uint worker_i, - G1ParPushHeapRSClosure* oops_in_heap_closure); + G1ScanObjsDuringUpdateRSClosure* oops_in_heap_closure); // Print accumulated summary info from the start of the VM. void print_summary_info(); @@ -188,7 +180,7 @@ G1CollectedHeap* _g1h; - G1ParPushHeapRSClosure* _push_heap_cl; + G1ScanObjsDuringScanRSClosure* _scan_objs_on_card_cl; CodeBlobClosure* _code_root_cl; G1BlockOffsetTable* _bot; @@ -202,7 +194,7 @@ void scan_strong_code_roots(HeapRegion* r); public: G1ScanRSClosure(G1RemSetScanState* scan_state, - G1ParPushHeapRSClosure* push_heap_cl, + G1ScanObjsDuringScanRSClosure* scan_obj_on_card, CodeBlobClosure* code_root_cl, uint worker_i);