--- a/src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp Thu Aug 30 12:39:26 2018 -0700
+++ b/src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp Thu Aug 30 16:16:19 2018 -0400
@@ -3225,7 +3225,7 @@
}
size_t chunk_size = sp->marking_task_size();
- while (!pst->is_task_claimed(/* reference */ nth_task)) {
+ while (pst->try_claim_task(/* reference */ nth_task)) {
// Having claimed the nth task in this space,
// compute the chunk that it corresponds to:
MemRegion span = MemRegion(aligned_start + nth_task*chunk_size,
@@ -4494,7 +4494,7 @@
if (n_tasks > 0) {
assert(pst->valid(), "Uninitialized use?");
HeapWord *start, *end;
- while (!pst->is_task_claimed(/* reference */ nth_task)) {
+ while (pst->try_claim_task(/* reference */ nth_task)) {
// We claimed task # nth_task; compute its boundaries.
if (chunk_top == 0) { // no samples were taken
assert(nth_task == 0 && n_tasks == 1, "Can have only 1 eden task");
@@ -4580,7 +4580,7 @@
assert(is_aligned(start_addr, alignment), "Check alignment");
assert(is_aligned(chunk_size, alignment), "Check alignment");
- while (!pst->is_task_claimed(/* reference */ nth_task)) {
+ while (pst->try_claim_task(/* reference */ nth_task)) {
// Having claimed the nth_task, compute corresponding mem-region,
// which is a-fortiori aligned correctly (i.e. at a MUT boundary).
// The alignment restriction ensures that we do not need any