362 } while (0) |
362 } while (0) |
363 |
363 |
364 protected: |
364 protected: |
365 |
365 |
366 // The young region list. |
366 // The young region list. |
367 YoungList* _young_list; |
367 G1EdenRegions _eden; |
|
368 G1SurvivorRegions _survivor; |
368 |
369 |
369 // The current policy object for the collector. |
370 // The current policy object for the collector. |
370 G1Policy* _g1_policy; |
371 G1Policy* _g1_policy; |
371 G1HeapSizingPolicy* _heap_sizing_policy; |
372 G1HeapSizingPolicy* _heap_sizing_policy; |
372 |
373 |
1330 static G1CollectedHeap* heap(); |
1331 static G1CollectedHeap* heap(); |
1331 |
1332 |
1332 void set_region_short_lived_locked(HeapRegion* hr); |
1333 void set_region_short_lived_locked(HeapRegion* hr); |
1333 // add appropriate methods for any other surv rate groups |
1334 // add appropriate methods for any other surv rate groups |
1334 |
1335 |
1335 YoungList* young_list() const { return _young_list; } |
1336 const G1SurvivorRegions* survivor() const { return &_survivor; } |
|
1337 |
|
1338 uint survivor_regions_count() const { |
|
1339 return _survivor.length(); |
|
1340 } |
|
1341 |
|
1342 uint eden_regions_count() const { |
|
1343 return _eden.length(); |
|
1344 } |
|
1345 |
|
1346 uint young_regions_count() const { |
|
1347 return _eden.length() + _survivor.length(); |
|
1348 } |
1336 |
1349 |
1337 uint old_regions_count() const { return _old_set.length(); } |
1350 uint old_regions_count() const { return _old_set.length(); } |
1338 |
1351 |
1339 uint humongous_regions_count() const { return _humongous_set.length(); } |
1352 uint humongous_regions_count() const { return _humongous_set.length(); } |
1340 |
1353 |
1341 // debugging |
1354 #ifdef ASSERT |
1342 bool check_young_list_well_formed() { |
1355 bool check_young_list_empty(); |
1343 return _young_list->check_list_well_formed(); |
1356 #endif |
1344 } |
|
1345 |
|
1346 bool check_young_list_empty(bool check_heap); |
|
1347 |
1357 |
1348 // *** Stuff related to concurrent marking. It's not clear to me that so |
1358 // *** Stuff related to concurrent marking. It's not clear to me that so |
1349 // many of these need to be public. |
1359 // many of these need to be public. |
1350 |
1360 |
1351 // The functions below are helper functions that a subclass of |
1361 // The functions below are helper functions that a subclass of |