< prev index next >
src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp
Print this page
rev 49650 : 8201326: Renaming ThreadLocalAllocationBuffer end to current_end
Summary: Rename the TLAB end field to a better name
Contributed-by: jcbeyler@google.com
*** 106,133 ****
// Fills the current tlab with a dummy filler array to create
// an illusion of a contiguous Eden and optionally retires the tlab.
// Waste accounting should be done in caller as appropriate; see,
// for example, clear_before_allocation().
void ThreadLocalAllocBuffer::make_parsable(bool retire, bool zap) {
! if (end() != NULL) {
invariants();
if (retire) {
myThread()->incr_allocated_bytes(used_bytes());
}
! CollectedHeap::fill_with_object(top(), hard_end(), retire && zap);
if (retire || ZeroTLAB) { // "Reset" the TLAB
set_start(NULL);
set_top(NULL);
set_pf_top(NULL);
! set_end(NULL);
}
}
assert(!(retire || ZeroTLAB) ||
! (start() == NULL && end() == NULL && top() == NULL),
"TLAB must be reset");
}
void ThreadLocalAllocBuffer::resize_all_tlabs() {
if (ResizeTLAB) {
--- 106,133 ----
// Fills the current tlab with a dummy filler array to create
// an illusion of a contiguous Eden and optionally retires the tlab.
// Waste accounting should be done in caller as appropriate; see,
// for example, clear_before_allocation().
void ThreadLocalAllocBuffer::make_parsable(bool retire, bool zap) {
! if (current_end() != NULL) {
invariants();
if (retire) {
myThread()->incr_allocated_bytes(used_bytes());
}
! CollectedHeap::fill_with_object(top(), reserved_end(), retire && zap);
if (retire || ZeroTLAB) { // "Reset" the TLAB
set_start(NULL);
set_top(NULL);
set_pf_top(NULL);
! set_current_end(NULL);
}
}
assert(!(retire || ZeroTLAB) ||
! (start() == NULL && current_end() == NULL && top() == NULL),
"TLAB must be reset");
}
void ThreadLocalAllocBuffer::resize_all_tlabs() {
if (ResizeTLAB) {
*** 181,191 ****
HeapWord* top,
HeapWord* end) {
set_start(start);
set_top(top);
set_pf_top(top);
! set_end(end);
invariants();
}
void ThreadLocalAllocBuffer::initialize() {
initialize(NULL, // start
--- 181,191 ----
HeapWord* top,
HeapWord* end) {
set_start(start);
set_top(top);
set_pf_top(top);
! set_current_end(end);
invariants();
}
void ThreadLocalAllocBuffer::initialize() {
initialize(NULL, // start
< prev index next >