< prev index next >
src/hotspot/share/gc/shared/ptrQueue.cpp
Print this page
*** 180,190 ****
// the allocation rate and the release rate are going to be fairly
// similar, due to how the buffers are used.
const size_t trigger_transfer = 10;
// Add to pending list. Update count first so no underflow in transfer.
! size_t pending_count = Atomic::add(1u, &_pending_count);
_pending_list.push(*node);
if (pending_count > trigger_transfer) {
try_transfer_pending();
}
}
--- 180,190 ----
// the allocation rate and the release rate are going to be fairly
// similar, due to how the buffers are used.
const size_t trigger_transfer = 10;
// Add to pending list. Update count first so no underflow in transfer.
! size_t pending_count = Atomic::add(&_pending_count, 1u);
_pending_list.push(*node);
if (pending_count > trigger_transfer) {
try_transfer_pending();
}
}
*** 217,227 ****
// Wait for any in-progress pops, to avoid ABA for them.
GlobalCounter::write_synchronize();
// Add synchronized nodes to _free_list.
// Update count first so no underflow in allocate().
! Atomic::add(count, &_free_count);
_free_list.prepend(*first, *last);
log_trace(gc, ptrqueue, freelist)
("Transferred %s pending to free: " SIZE_FORMAT, name(), count);
}
Atomic::release_store(&_transfer_lock, false);
--- 217,227 ----
// Wait for any in-progress pops, to avoid ABA for them.
GlobalCounter::write_synchronize();
// Add synchronized nodes to _free_list.
// Update count first so no underflow in allocate().
! Atomic::add(&_free_count, count);
_free_list.prepend(*first, *last);
log_trace(gc, ptrqueue, freelist)
("Transferred %s pending to free: " SIZE_FORMAT, name(), count);
}
Atomic::release_store(&_transfer_lock, false);
*** 256,261 ****
}
void PtrQueueSet::deallocate_buffer(BufferNode* node) {
_allocator->release(node);
}
-
--- 256,260 ----
< prev index next >