Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/g1RemSet.cpp @ 12343:d55c004e1d4d
8025305: Cleanup CardTableModRefBS usage in G1
Summary: Move some G1 specific code from CardTableModRefBS to G1SATBCardTableModRefBS.
Reviewed-by: brutisso, tschatzl, ehelin
author | mgerdin |
---|---|
date | Tue, 24 Sep 2013 14:46:29 +0200 |
parents | c319b188c7b2 |
children | 7ec10139bf37 |
comparison
equal
deleted
inserted
replaced
12342:ccef6e165e8b | 12343:d55c004e1d4d |
---|---|
107 | 107 |
108 OopsInHeapRegionClosure* _oc; | 108 OopsInHeapRegionClosure* _oc; |
109 CodeBlobToOopClosure* _code_root_cl; | 109 CodeBlobToOopClosure* _code_root_cl; |
110 | 110 |
111 G1BlockOffsetSharedArray* _bot_shared; | 111 G1BlockOffsetSharedArray* _bot_shared; |
112 CardTableModRefBS *_ct_bs; | 112 G1SATBCardTableModRefBS *_ct_bs; |
113 | 113 |
114 double _strong_code_root_scan_time_sec; | 114 double _strong_code_root_scan_time_sec; |
115 int _worker_i; | 115 int _worker_i; |
116 int _block_size; | 116 int _block_size; |
117 bool _try_claimed; | 117 bool _try_claimed; |
128 _worker_i(worker_i), | 128 _worker_i(worker_i), |
129 _try_claimed(false) | 129 _try_claimed(false) |
130 { | 130 { |
131 _g1h = G1CollectedHeap::heap(); | 131 _g1h = G1CollectedHeap::heap(); |
132 _bot_shared = _g1h->bot_shared(); | 132 _bot_shared = _g1h->bot_shared(); |
133 _ct_bs = (CardTableModRefBS*) (_g1h->barrier_set()); | 133 _ct_bs = _g1h->g1_barrier_set(); |
134 _block_size = MAX2<int>(G1RSetScanBlockSize, 1); | 134 _block_size = MAX2<int>(G1RSetScanBlockSize, 1); |
135 } | 135 } |
136 | 136 |
137 void set_try_claimed() { _try_claimed = true; } | 137 void set_try_claimed() { _try_claimed = true; } |
138 | 138 |
503 CardTableModRefBS* _ctbs; | 503 CardTableModRefBS* _ctbs; |
504 public: | 504 public: |
505 ScrubRSClosure(BitMap* region_bm, BitMap* card_bm) : | 505 ScrubRSClosure(BitMap* region_bm, BitMap* card_bm) : |
506 _g1h(G1CollectedHeap::heap()), | 506 _g1h(G1CollectedHeap::heap()), |
507 _region_bm(region_bm), _card_bm(card_bm), | 507 _region_bm(region_bm), _card_bm(card_bm), |
508 _ctbs(NULL) | 508 _ctbs(_g1h->g1_barrier_set()) {} |
509 { | |
510 ModRefBarrierSet* bs = _g1h->mr_bs(); | |
511 guarantee(bs->is_a(BarrierSet::CardTableModRef), "Precondition"); | |
512 _ctbs = (CardTableModRefBS*)bs; | |
513 } | |
514 | 509 |
515 bool doHeapRegion(HeapRegion* r) { | 510 bool doHeapRegion(HeapRegion* r) { |
516 if (!r->continuesHumongous()) { | 511 if (!r->continuesHumongous()) { |
517 r->rem_set()->scrub(_ctbs, _region_bm, _card_bm); | 512 r->rem_set()->scrub(_ctbs, _region_bm, _card_bm); |
518 } | 513 } |