src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp

Print this page

        

*** 98,108 **** RefineCardTableEntryClosure(SuspendibleThreadSet* sts, G1RemSet* g1rs, ConcurrentG1Refine* cg1r) : _sts(sts), _g1rs(g1rs), _cg1r(cg1r), _concurrent(true) {} ! bool do_card_ptr(jbyte* card_ptr, int worker_i) { bool oops_into_cset = _g1rs->refine_card(card_ptr, worker_i, false); // This path is executed by the concurrent refine or mutator threads, // concurrently, and so we do not care if card_ptr contains references // that point into the collection set. assert(!oops_into_cset, "should be"); --- 98,108 ---- RefineCardTableEntryClosure(SuspendibleThreadSet* sts, G1RemSet* g1rs, ConcurrentG1Refine* cg1r) : _sts(sts), _g1rs(g1rs), _cg1r(cg1r), _concurrent(true) {} ! bool do_card_ptr(jbyte* card_ptr, uint worker_i) { bool oops_into_cset = _g1rs->refine_card(card_ptr, worker_i, false); // This path is executed by the concurrent refine or mutator threads, // concurrently, and so we do not care if card_ptr contains references // that point into the collection set. assert(!oops_into_cset, "should be");
*** 129,139 **** { _g1h = G1CollectedHeap::heap(); _ctbs = (CardTableModRefBS*)_g1h->barrier_set(); for (int i = 0; i < 256; i++) _histo[i] = 0; } ! bool do_card_ptr(jbyte* card_ptr, int worker_i) { if (_g1h->is_in_reserved(_ctbs->addr_for(card_ptr))) { _calls++; unsigned char* ujb = (unsigned char*)card_ptr; int ind = (int)(*ujb); _histo[ind]++; --- 129,139 ---- { _g1h = G1CollectedHeap::heap(); _ctbs = (CardTableModRefBS*)_g1h->barrier_set(); for (int i = 0; i < 256; i++) _histo[i] = 0; } ! bool do_card_ptr(jbyte* card_ptr, uint worker_i) { if (_g1h->is_in_reserved(_ctbs->addr_for(card_ptr))) { _calls++; unsigned char* ujb = (unsigned char*)card_ptr; int ind = (int)(*ujb); _histo[ind]++;
*** 161,171 **** _calls(0) { _g1h = G1CollectedHeap::heap(); _ctbs = (CardTableModRefBS*)_g1h->barrier_set(); } ! bool do_card_ptr(jbyte* card_ptr, int worker_i) { if (_g1h->is_in_reserved(_ctbs->addr_for(card_ptr))) { _calls++; *card_ptr = 0; } return true; --- 161,171 ---- _calls(0) { _g1h = G1CollectedHeap::heap(); _ctbs = (CardTableModRefBS*)_g1h->barrier_set(); } ! bool do_card_ptr(jbyte* card_ptr, uint worker_i) { if (_g1h->is_in_reserved(_ctbs->addr_for(card_ptr))) { _calls++; *card_ptr = 0; } return true;
*** 173,183 **** int calls() { return _calls; } }; class RedirtyLoggedCardTableEntryFastClosure : public CardTableEntryClosure { public: ! bool do_card_ptr(jbyte* card_ptr, int worker_i) { *card_ptr = CardTableModRefBS::dirty_card_val(); return true; } }; --- 173,183 ---- int calls() { return _calls; } }; class RedirtyLoggedCardTableEntryFastClosure : public CardTableEntryClosure { public: ! bool do_card_ptr(jbyte* card_ptr, uint worker_i) { *card_ptr = CardTableModRefBS::dirty_card_val(); return true; } };
*** 1210,1222 **** } class RebuildRSOutOfRegionClosure: public HeapRegionClosure { G1CollectedHeap* _g1h; UpdateRSOopClosure _cl; ! int _worker_i; public: ! RebuildRSOutOfRegionClosure(G1CollectedHeap* g1, int worker_i = 0) : _cl(g1->g1_rem_set(), worker_i), _worker_i(worker_i), _g1h(g1) { } --- 1210,1222 ---- } class RebuildRSOutOfRegionClosure: public HeapRegionClosure { G1CollectedHeap* _g1h; UpdateRSOopClosure _cl; ! uint _worker_i; public: ! RebuildRSOutOfRegionClosure(G1CollectedHeap* g1, uint worker_i = 0) : _cl(g1->g1_rem_set(), worker_i), _worker_i(worker_i), _g1h(g1) { }
*** 2321,2331 **** #endif // PRODUCT void G1CollectedHeap::iterate_dirty_card_closure(CardTableEntryClosure* cl, DirtyCardQueue* into_cset_dcq, bool concurrent, ! int worker_i) { // Clean cards in the hot card cache G1HotCardCache* hot_card_cache = _cg1r->hot_card_cache(); hot_card_cache->drain(worker_i, g1_rem_set(), into_cset_dcq); DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set(); --- 2321,2331 ---- #endif // PRODUCT void G1CollectedHeap::iterate_dirty_card_closure(CardTableEntryClosure* cl, DirtyCardQueue* into_cset_dcq, bool concurrent, ! uint worker_i) { // Clean cards in the hot card cache G1HotCardCache* hot_card_cache = _cg1r->hot_card_cache(); hot_card_cache->drain(worker_i, g1_rem_set(), into_cset_dcq); DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set();
*** 2865,2875 **** } } // Given the id of a worker, obtain or calculate a suitable // starting region for iterating over the current collection set. ! HeapRegion* G1CollectedHeap::start_cset_region_for_worker(int worker_i) { assert(get_gc_time_stamp() > 0, "should have been updated by now"); HeapRegion* result = NULL; unsigned gc_time_stamp = get_gc_time_stamp(); --- 2865,2875 ---- } } // Given the id of a worker, obtain or calculate a suitable // starting region for iterating over the current collection set. ! HeapRegion* G1CollectedHeap::start_cset_region_for_worker(uint worker_i) { assert(get_gc_time_stamp() > 0, "should have been updated by now"); HeapRegion* result = NULL; unsigned gc_time_stamp = get_gc_time_stamp();
*** 5123,5133 **** g1_process_strong_roots(bool is_scavenging, ScanningOption so, OopClosure* scan_non_heap_roots, OopsInHeapRegionClosure* scan_rs, G1KlassScanClosure* scan_klasses, ! int worker_i) { // First scan the strong roots double ext_roots_start = os::elapsedTime(); double closure_app_time_sec = 0.0; --- 5123,5133 ---- g1_process_strong_roots(bool is_scavenging, ScanningOption so, OopClosure* scan_non_heap_roots, OopsInHeapRegionClosure* scan_rs, G1KlassScanClosure* scan_klasses, ! uint worker_i) { // First scan the strong roots double ext_roots_start = os::elapsedTime(); double closure_app_time_sec = 0.0;