Print this page
rev 4008 : 8001985: G1: Backport fix for 7200261 to hsx24
Summary: The automatic backport of the fix for 7200261 did not apply cleanly to hsx24 - there were two rejected hunks that had to be fixed up by hand.
Reviewed-by:

Split Close
Expand all
Collapse all
          --- old/src/share/vm/gc_implementation/g1/concurrentMark.cpp
          +++ new/src/share/vm/gc_implementation/g1/concurrentMark.cpp
↓ open down ↓ 1182 lines elided ↑ open up ↑
1183 1183    _remark_weak_ref_times.add((now - mark_work_end) * 1000.0);
1184 1184    _remark_times.add((now - start) * 1000.0);
1185 1185  
1186 1186    g1p->record_concurrent_mark_remark_end();
1187 1187  }
1188 1188  
1189 1189  // Base class of the closures that finalize and verify the
1190 1190  // liveness counting data.
1191 1191  class CMCountDataClosureBase: public HeapRegionClosure {
1192 1192  protected:
     1193 +  G1CollectedHeap* _g1h;
1193 1194    ConcurrentMark* _cm;
     1195 +  CardTableModRefBS* _ct_bs;
     1196 +
1194 1197    BitMap* _region_bm;
1195 1198    BitMap* _card_bm;
1196 1199  
1197      -  void set_card_bitmap_range(BitMap::idx_t start_idx, BitMap::idx_t last_idx) {
1198      -    assert(start_idx <= last_idx, "sanity");
1199      -
1200      -    // Set the inclusive bit range [start_idx, last_idx].
1201      -    // For small ranges (up to 8 cards) use a simple loop; otherwise
1202      -    // use par_at_put_range.
1203      -    if ((last_idx - start_idx) < 8) {
1204      -      for (BitMap::idx_t i = start_idx; i <= last_idx; i += 1) {
1205      -        _card_bm->par_set_bit(i);
1206      -      }
1207      -    } else {
1208      -      assert(last_idx < _card_bm->size(), "sanity");
1209      -      // Note BitMap::par_at_put_range() is exclusive.
1210      -      _card_bm->par_at_put_range(start_idx, last_idx+1, true);
1211      -    }
1212      -  }
1213      -
1214      -  // It takes a region that's not empty (i.e., it has at least one
     1200 +  // Takes a region that's not empty (i.e., it has at least one
1215 1201    // live object in it and sets its corresponding bit on the region
1216 1202    // bitmap to 1. If the region is "starts humongous" it will also set
1217 1203    // to 1 the bits on the region bitmap that correspond to its
1218 1204    // associated "continues humongous" regions.
1219 1205    void set_bit_for_region(HeapRegion* hr) {
1220 1206      assert(!hr->continuesHumongous(), "should have filtered those out");
1221 1207  
1222 1208      BitMap::idx_t index = (BitMap::idx_t) hr->hrs_index();
1223 1209      if (!hr->startsHumongous()) {
1224 1210        // Normal (non-humongous) case: just set the bit.
1225 1211        _region_bm->par_at_put(index, true);
1226 1212      } else {
1227 1213        // Starts humongous case: calculate how many regions are part of
1228 1214        // this humongous region and then set the bit range.
1229 1215        BitMap::idx_t end_index = (BitMap::idx_t) hr->last_hc_index();
1230 1216        _region_bm->par_at_put_range(index, end_index, true);
1231 1217      }
1232 1218    }
1233 1219  
1234 1220  public:
1235      -  CMCountDataClosureBase(ConcurrentMark *cm,
     1221 +  CMCountDataClosureBase(G1CollectedHeap* g1h,
1236 1222                           BitMap* region_bm, BitMap* card_bm):
1237      -    _cm(cm), _region_bm(region_bm), _card_bm(card_bm) { }
     1223 +    _g1h(g1h), _cm(g1h->concurrent_mark()),
     1224 +    _ct_bs((CardTableModRefBS*) (g1h->barrier_set())),
     1225 +    _region_bm(region_bm), _card_bm(card_bm) { }
1238 1226  };
1239 1227  
1240 1228  // Closure that calculates the # live objects per region. Used
1241 1229  // for verification purposes during the cleanup pause.
1242 1230  class CalcLiveObjectsClosure: public CMCountDataClosureBase {
1243 1231    CMBitMapRO* _bm;
1244 1232    size_t _region_marked_bytes;
1245 1233  
1246 1234  public:
1247      -  CalcLiveObjectsClosure(CMBitMapRO *bm, ConcurrentMark *cm,
     1235 +  CalcLiveObjectsClosure(CMBitMapRO *bm, G1CollectedHeap* g1h,
1248 1236                           BitMap* region_bm, BitMap* card_bm) :
1249      -    CMCountDataClosureBase(cm, region_bm, card_bm),
     1237 +    CMCountDataClosureBase(g1h, region_bm, card_bm),
1250 1238      _bm(bm), _region_marked_bytes(0) { }
1251 1239  
1252 1240    bool doHeapRegion(HeapRegion* hr) {
1253 1241  
1254 1242      if (hr->continuesHumongous()) {
1255 1243        // We will ignore these here and process them when their
1256 1244        // associated "starts humongous" region is processed (see
1257 1245        // set_bit_for_heap_region()). Note that we cannot rely on their
1258 1246        // associated "starts humongous" region to have their bit set to
1259 1247        // 1 since, due to the region chunking in the parallel region
1260 1248        // iteration, a "continues humongous" region might be visited
1261 1249        // before its associated "starts humongous".
1262 1250        return false;
1263 1251      }
1264 1252  
1265      -    HeapWord* nextTop = hr->next_top_at_mark_start();
1266      -    HeapWord* start   = hr->bottom();
     1253 +    HeapWord* ntams = hr->next_top_at_mark_start();
     1254 +    HeapWord* start = hr->bottom();
1267 1255  
1268      -    assert(start <= hr->end() && start <= nextTop && nextTop <= hr->end(),
     1256 +    assert(start <= hr->end() && start <= ntams && ntams <= hr->end(),
1269 1257             err_msg("Preconditions not met - "
1270      -                   "start: "PTR_FORMAT", nextTop: "PTR_FORMAT", end: "PTR_FORMAT,
1271      -                   start, nextTop, hr->end()));
     1258 +                   "start: "PTR_FORMAT", ntams: "PTR_FORMAT", end: "PTR_FORMAT,
     1259 +                   start, ntams, hr->end()));
1272 1260  
1273 1261      // Find the first marked object at or after "start".
1274      -    start = _bm->getNextMarkedWordAddress(start, nextTop);
     1262 +    start = _bm->getNextMarkedWordAddress(start, ntams);
1275 1263  
1276 1264      size_t marked_bytes = 0;
1277 1265  
1278      -    while (start < nextTop) {
     1266 +    while (start < ntams) {
1279 1267        oop obj = oop(start);
1280 1268        int obj_sz = obj->size();
1281      -      HeapWord* obj_last = start + obj_sz - 1;
     1269 +      HeapWord* obj_end = start + obj_sz;
1282 1270  
1283 1271        BitMap::idx_t start_idx = _cm->card_bitmap_index_for(start);
1284      -      BitMap::idx_t last_idx = _cm->card_bitmap_index_for(obj_last);
     1272 +      BitMap::idx_t end_idx = _cm->card_bitmap_index_for(obj_end);
1285 1273  
1286      -      // Set the bits in the card BM for this object (inclusive).
1287      -      set_card_bitmap_range(start_idx, last_idx);
     1274 +      // Note: if we're looking at the last region in heap - obj_end
     1275 +      // could be actually just beyond the end of the heap; end_idx
     1276 +      // will then correspond to a (non-existent) card that is also
     1277 +      // just beyond the heap.
     1278 +      if (_g1h->is_in_g1_reserved(obj_end) && !_ct_bs->is_card_aligned(obj_end)) {
     1279 +        // end of object is not card aligned - increment to cover
     1280 +        // all the cards spanned by the object
     1281 +        end_idx += 1;
     1282 +      }
     1283 +
     1284 +      // Set the bits in the card BM for the cards spanned by this object.
     1285 +      _cm->set_card_bitmap_range(_card_bm, start_idx, end_idx, true /* is_par */);
1288 1286  
1289 1287        // Add the size of this object to the number of marked bytes.
1290 1288        marked_bytes += (size_t)obj_sz * HeapWordSize;
1291 1289  
1292 1290        // Find the next marked object after this one.
1293      -      start = _bm->getNextMarkedWordAddress(obj_last + 1, nextTop);
     1291 +      start = _bm->getNextMarkedWordAddress(obj_end, ntams);
1294 1292      }
1295 1293  
1296 1294      // Mark the allocated-since-marking portion...
1297 1295      HeapWord* top = hr->top();
1298      -    if (nextTop < top) {
1299      -      BitMap::idx_t start_idx = _cm->card_bitmap_index_for(nextTop);
1300      -      BitMap::idx_t last_idx = _cm->card_bitmap_index_for(top - 1);
     1296 +    if (ntams < top) {
     1297 +      BitMap::idx_t start_idx = _cm->card_bitmap_index_for(ntams);
     1298 +      BitMap::idx_t end_idx = _cm->card_bitmap_index_for(top);
1301 1299  
1302      -      set_card_bitmap_range(start_idx, last_idx);
     1300 +      // Note: if we're looking at the last region in heap - top
     1301 +      // could be actually just beyond the end of the heap; end_idx
     1302 +      // will then correspond to a (non-existent) card that is also
     1303 +      // just beyond the heap.
     1304 +      if (_g1h->is_in_g1_reserved(top) && !_ct_bs->is_card_aligned(top)) {
     1305 +        // end of object is not card aligned - increment to cover
     1306 +        // all the cards spanned by the object
     1307 +        end_idx += 1;
     1308 +      }
     1309 +      _cm->set_card_bitmap_range(_card_bm, start_idx, end_idx, true /* is_par */);
1303 1310  
1304 1311        // This definitely means the region has live objects.
1305 1312        set_bit_for_region(hr);
1306 1313      }
1307 1314  
1308 1315      // Update the live region bitmap.
1309 1316      if (marked_bytes > 0) {
1310 1317        set_bit_for_region(hr);
1311 1318      }
1312 1319  
↓ open down ↓ 6 lines elided ↑ open up ↑
1319 1326  
1320 1327    size_t region_marked_bytes() const { return _region_marked_bytes; }
1321 1328  };
1322 1329  
1323 1330  // Heap region closure used for verifying the counting data
1324 1331  // that was accumulated concurrently and aggregated during
1325 1332  // the remark pause. This closure is applied to the heap
1326 1333  // regions during the STW cleanup pause.
1327 1334  
1328 1335  class VerifyLiveObjectDataHRClosure: public HeapRegionClosure {
     1336 +  G1CollectedHeap* _g1h;
1329 1337    ConcurrentMark* _cm;
1330 1338    CalcLiveObjectsClosure _calc_cl;
1331 1339    BitMap* _region_bm;   // Region BM to be verified
1332 1340    BitMap* _card_bm;     // Card BM to be verified
1333 1341    bool _verbose;        // verbose output?
1334 1342  
1335 1343    BitMap* _exp_region_bm; // Expected Region BM values
1336 1344    BitMap* _exp_card_bm;   // Expected card BM values
1337 1345  
1338 1346    int _failures;
1339 1347  
1340 1348  public:
1341      -  VerifyLiveObjectDataHRClosure(ConcurrentMark* cm,
     1349 +  VerifyLiveObjectDataHRClosure(G1CollectedHeap* g1h,
1342 1350                                  BitMap* region_bm,
1343 1351                                  BitMap* card_bm,
1344 1352                                  BitMap* exp_region_bm,
1345 1353                                  BitMap* exp_card_bm,
1346 1354                                  bool verbose) :
1347      -    _cm(cm),
1348      -    _calc_cl(_cm->nextMarkBitMap(), _cm, exp_region_bm, exp_card_bm),
     1355 +    _g1h(g1h), _cm(g1h->concurrent_mark()),
     1356 +    _calc_cl(_cm->nextMarkBitMap(), g1h, exp_region_bm, exp_card_bm),
1349 1357      _region_bm(region_bm), _card_bm(card_bm), _verbose(verbose),
1350 1358      _exp_region_bm(exp_region_bm), _exp_card_bm(exp_card_bm),
1351 1359      _failures(0) { }
1352 1360  
1353 1361    int failures() const { return _failures; }
1354 1362  
1355 1363    bool doHeapRegion(HeapRegion* hr) {
1356 1364      if (hr->continuesHumongous()) {
1357 1365        // We will ignore these here and process them when their
1358 1366        // associated "starts humongous" region is processed (see
↓ open down ↓ 126 lines elided ↑ open up ↑
1485 1493  
1486 1494      assert(_expected_card_bm->size() == _actual_card_bm->size(), "sanity");
1487 1495      assert(_expected_region_bm->size() == _actual_region_bm->size(), "sanity");
1488 1496  
1489 1497      _verbose = _cm->verbose_medium();
1490 1498    }
1491 1499  
1492 1500    void work(uint worker_id) {
1493 1501      assert(worker_id < _n_workers, "invariant");
1494 1502  
1495      -    VerifyLiveObjectDataHRClosure verify_cl(_cm,
     1503 +    VerifyLiveObjectDataHRClosure verify_cl(_g1h,
1496 1504                                              _actual_region_bm, _actual_card_bm,
1497 1505                                              _expected_region_bm,
1498 1506                                              _expected_card_bm,
1499 1507                                              _verbose);
1500 1508  
1501 1509      if (G1CollectedHeap::use_parallel_gc_threads()) {
1502 1510        _g1h->heap_region_par_iterate_chunked(&verify_cl,
1503 1511                                              worker_id,
1504 1512                                              _n_workers,
1505 1513                                              HeapRegion::VerifyCountClaimValue);
↓ open down ↓ 9 lines elided ↑ open up ↑
1515 1523  
1516 1524  // Closure that finalizes the liveness counting data.
1517 1525  // Used during the cleanup pause.
1518 1526  // Sets the bits corresponding to the interval [NTAMS, top]
1519 1527  // (which contains the implicitly live objects) in the
1520 1528  // card liveness bitmap. Also sets the bit for each region,
1521 1529  // containing live data, in the region liveness bitmap.
1522 1530  
1523 1531  class FinalCountDataUpdateClosure: public CMCountDataClosureBase {
1524 1532   public:
1525      -  FinalCountDataUpdateClosure(ConcurrentMark* cm,
     1533 +  FinalCountDataUpdateClosure(G1CollectedHeap* g1h,
1526 1534                                BitMap* region_bm,
1527 1535                                BitMap* card_bm) :
1528      -    CMCountDataClosureBase(cm, region_bm, card_bm) { }
     1536 +    CMCountDataClosureBase(g1h, region_bm, card_bm) { }
1529 1537  
1530 1538    bool doHeapRegion(HeapRegion* hr) {
1531 1539  
1532 1540      if (hr->continuesHumongous()) {
1533 1541        // We will ignore these here and process them when their
1534 1542        // associated "starts humongous" region is processed (see
1535 1543        // set_bit_for_heap_region()). Note that we cannot rely on their
1536 1544        // associated "starts humongous" region to have their bit set to
1537 1545        // 1 since, due to the region chunking in the parallel region
1538 1546        // iteration, a "continues humongous" region might be visited
↓ open down ↓ 3 lines elided ↑ open up ↑
1542 1550  
1543 1551      HeapWord* ntams = hr->next_top_at_mark_start();
1544 1552      HeapWord* top   = hr->top();
1545 1553  
1546 1554      assert(hr->bottom() <= ntams && ntams <= hr->end(), "Preconditions.");
1547 1555  
1548 1556      // Mark the allocated-since-marking portion...
1549 1557      if (ntams < top) {
1550 1558        // This definitely means the region has live objects.
1551 1559        set_bit_for_region(hr);
1552      -    }
1553 1560  
1554      -    // Now set the bits for [ntams, top]
1555      -    BitMap::idx_t start_idx = _cm->card_bitmap_index_for(ntams);
1556      -    BitMap::idx_t last_idx = _cm->card_bitmap_index_for(top);
1557      -    set_card_bitmap_range(start_idx, last_idx);
     1561 +      // Now set the bits in the card bitmap for [ntams, top)
     1562 +      BitMap::idx_t start_idx = _cm->card_bitmap_index_for(ntams);
     1563 +      BitMap::idx_t end_idx = _cm->card_bitmap_index_for(top);
     1564 +
     1565 +      // Note: if we're looking at the last region in heap - top
     1566 +      // could be actually just beyond the end of the heap; end_idx
     1567 +      // will then correspond to a (non-existent) card that is also
     1568 +      // just beyond the heap.
     1569 +      if (_g1h->is_in_g1_reserved(top) && !_ct_bs->is_card_aligned(top)) {
     1570 +        // end of object is not card aligned - increment to cover
     1571 +        // all the cards spanned by the object
     1572 +        end_idx += 1;
     1573 +      }
     1574 +
     1575 +      assert(end_idx <= _card_bm->size(),
     1576 +             err_msg("oob: end_idx=  "SIZE_FORMAT", bitmap size= "SIZE_FORMAT,
     1577 +                     end_idx, _card_bm->size()));
     1578 +      assert(start_idx < _card_bm->size(),
     1579 +             err_msg("oob: start_idx=  "SIZE_FORMAT", bitmap size= "SIZE_FORMAT,
     1580 +                     start_idx, _card_bm->size()));
     1581 +
     1582 +      _cm->set_card_bitmap_range(_card_bm, start_idx, end_idx, true /* is_par */);
     1583 +     }
1558 1584  
1559 1585      // Set the bit for the region if it contains live data
1560 1586      if (hr->next_marked_bytes() > 0) {
1561 1587        set_bit_for_region(hr);
1562 1588      }
1563 1589  
1564 1590      return false;
1565 1591    }
1566 1592  };
1567 1593  
↓ open down ↓ 19 lines elided ↑ open up ↑
1587 1613          "Should have been previously set");
1588 1614        _n_workers = _g1h->workers()->active_workers();
1589 1615      } else {
1590 1616        _n_workers = 1;
1591 1617      }
1592 1618    }
1593 1619  
1594 1620    void work(uint worker_id) {
1595 1621      assert(worker_id < _n_workers, "invariant");
1596 1622  
1597      -    FinalCountDataUpdateClosure final_update_cl(_cm,
     1623 +    FinalCountDataUpdateClosure final_update_cl(_g1h,
1598 1624                                                  _actual_region_bm,
1599 1625                                                  _actual_card_bm);
1600 1626  
1601 1627      if (G1CollectedHeap::use_parallel_gc_threads()) {
1602 1628        _g1h->heap_region_par_iterate_chunked(&final_update_cl,
1603 1629                                              worker_id,
1604 1630                                              _n_workers,
1605 1631                                              HeapRegion::FinalCountClaimValue);
1606 1632      } else {
1607 1633        _g1h->heap_region_iterate(&final_update_cl);
↓ open down ↓ 1219 lines elided ↑ open up ↑
2827 2853  
2828 2854    for (int i = 0; i < (int)_max_task_num; ++i) {
2829 2855      OopTaskQueue* queue = _task_queues->queue(i);
2830 2856      queue->set_empty();
2831 2857    }
2832 2858  }
2833 2859  
2834 2860  // Aggregate the counting data that was constructed concurrently
2835 2861  // with marking.
2836 2862  class AggregateCountDataHRClosure: public HeapRegionClosure {
     2863 +  G1CollectedHeap* _g1h;
2837 2864    ConcurrentMark* _cm;
     2865 +  CardTableModRefBS* _ct_bs;
2838 2866    BitMap* _cm_card_bm;
2839 2867    size_t _max_task_num;
2840 2868  
2841 2869   public:
2842      -  AggregateCountDataHRClosure(ConcurrentMark *cm,
     2870 +  AggregateCountDataHRClosure(G1CollectedHeap* g1h,
2843 2871                                BitMap* cm_card_bm,
2844 2872                                size_t max_task_num) :
2845      -    _cm(cm), _cm_card_bm(cm_card_bm),
2846      -    _max_task_num(max_task_num) { }
2847      -
2848      -  bool is_card_aligned(HeapWord* p) {
2849      -    return ((uintptr_t(p) & (CardTableModRefBS::card_size - 1)) == 0);
2850      -  }
     2873 +    _g1h(g1h), _cm(g1h->concurrent_mark()),
     2874 +    _ct_bs((CardTableModRefBS*) (g1h->barrier_set())),
     2875 +    _cm_card_bm(cm_card_bm), _max_task_num(max_task_num) { }
2851 2876  
2852 2877    bool doHeapRegion(HeapRegion* hr) {
2853 2878      if (hr->continuesHumongous()) {
2854 2879        // We will ignore these here and process them when their
2855 2880        // associated "starts humongous" region is processed.
2856 2881        // Note that we cannot rely on their associated
2857 2882        // "starts humongous" region to have their bit set to 1
2858 2883        // since, due to the region chunking in the parallel region
2859 2884        // iteration, a "continues humongous" region might be visited
2860 2885        // before its associated "starts humongous".
↓ open down ↓ 10 lines elided ↑ open up ↑
2871 2896                     "top: "PTR_FORMAT", end: "PTR_FORMAT,
2872 2897                     start, limit, hr->top(), hr->end()));
2873 2898  
2874 2899      assert(hr->next_marked_bytes() == 0, "Precondition");
2875 2900  
2876 2901      if (start == limit) {
2877 2902        // NTAMS of this region has not been set so nothing to do.
2878 2903        return false;
2879 2904      }
2880 2905  
2881      -    assert(is_card_aligned(start), "sanity");
2882      -    assert(is_card_aligned(end), "sanity");
     2906 +    // 'start' should be in the heap.
     2907 +    assert(_g1h->is_in_g1_reserved(start) && _ct_bs->is_card_aligned(start), "sanity");
     2908 +    // 'end' *may* be just beyone the end of the heap (if hr is the last region)
     2909 +    assert(!_g1h->is_in_g1_reserved(end) || _ct_bs->is_card_aligned(end), "sanity");
2883 2910  
2884 2911      BitMap::idx_t start_idx = _cm->card_bitmap_index_for(start);
2885 2912      BitMap::idx_t limit_idx = _cm->card_bitmap_index_for(limit);
2886 2913      BitMap::idx_t end_idx = _cm->card_bitmap_index_for(end);
2887 2914  
2888      -    // If ntams is not card aligned then we bump the index for
2889      -    // limit so that we get the card spanning ntams.
2890      -    if (!is_card_aligned(limit)) {
     2915 +    // If ntams is not card aligned then we bump card bitmap index
     2916 +    // for limit so that we get the all the cards spanned by
     2917 +    // the object ending at ntams.
     2918 +    // Note: if this is the last region in the heap then ntams
     2919 +    // could be actually just beyond the end of the the heap;
     2920 +    // limit_idx will then  correspond to a (non-existent) card
     2921 +    // that is also outside the heap.
     2922 +    if (_g1h->is_in_g1_reserved(limit) && !_ct_bs->is_card_aligned(limit)) {
2891 2923        limit_idx += 1;
2892 2924      }
2893 2925  
2894 2926      assert(limit_idx <= end_idx, "or else use atomics");
2895 2927  
2896 2928      // Aggregate the "stripe" in the count data associated with hr.
2897 2929      uint hrs_index = hr->hrs_index();
2898 2930      size_t marked_bytes = 0;
2899 2931  
2900 2932      for (int i = 0; (size_t)i < _max_task_num; i += 1) {
↓ open down ↓ 8 lines elided ↑ open up ↑
2909 2941        // into the global card bitmap.
2910 2942        BitMap::idx_t scan_idx = task_card_bm->get_next_one_offset(start_idx, limit_idx);
2911 2943  
2912 2944        while (scan_idx < limit_idx) {
2913 2945          assert(task_card_bm->at(scan_idx) == true, "should be");
2914 2946          _cm_card_bm->set_bit(scan_idx);
2915 2947          assert(_cm_card_bm->at(scan_idx) == true, "should be");
2916 2948  
2917 2949          // BitMap::get_next_one_offset() can handle the case when
2918 2950          // its left_offset parameter is greater than its right_offset
2919      -        // parameter. If does, however, have an early exit if
     2951 +        // parameter. It does, however, have an early exit if
2920 2952          // left_offset == right_offset. So let's limit the value
2921 2953          // passed in for left offset here.
2922 2954          BitMap::idx_t next_idx = MIN2(scan_idx + 1, limit_idx);
2923 2955          scan_idx = task_card_bm->get_next_one_offset(next_idx, limit_idx);
2924 2956        }
2925 2957      }
2926 2958  
2927 2959      // Update the marked bytes for this region.
2928 2960      hr->add_to_marked_bytes(marked_bytes);
2929 2961  
↓ open down ↓ 15 lines elided ↑ open up ↑
2945 2977                             ConcurrentMark* cm,
2946 2978                             BitMap* cm_card_bm,
2947 2979                             size_t max_task_num,
2948 2980                             int n_workers) :
2949 2981      AbstractGangTask("Count Aggregation"),
2950 2982      _g1h(g1h), _cm(cm), _cm_card_bm(cm_card_bm),
2951 2983      _max_task_num(max_task_num),
2952 2984      _active_workers(n_workers) { }
2953 2985  
2954 2986    void work(uint worker_id) {
2955      -    AggregateCountDataHRClosure cl(_cm, _cm_card_bm, _max_task_num);
     2987 +    AggregateCountDataHRClosure cl(_g1h, _cm_card_bm, _max_task_num);
2956 2988  
2957 2989      if (G1CollectedHeap::use_parallel_gc_threads()) {
2958 2990        _g1h->heap_region_par_iterate_chunked(&cl, worker_id,
2959 2991                                              _active_workers,
2960 2992                                              HeapRegion::AggregateCountClaimValue);
2961 2993      } else {
2962 2994        _g1h->heap_region_iterate(&cl);
2963 2995      }
2964 2996    }
2965 2997  };
↓ open down ↓ 1451 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX