< prev index next >
src/share/vm/gc/shared/threadLocalAllocBuffer.cpp
Print this page
rev 13139 : [mq]: heap7
rev 13140 : [mq]: heapz8
*** 125,135 ****
set_actual_end(NULL);
set_slow_path_end(NULL);
}
}
assert(!(retire || ZeroTLAB) ||
! (start() == NULL && end() == NULL && top() == NULL),
"TLAB must be reset");
}
void ThreadLocalAllocBuffer::resize_all_tlabs() {
if (ResizeTLAB) {
--- 125,136 ----
set_actual_end(NULL);
set_slow_path_end(NULL);
}
}
assert(!(retire || ZeroTLAB) ||
! (start() == NULL && end() == NULL && top() == NULL &&
! actual_end() == NULL && slow_path_end() == NULL),
"TLAB must be reset");
}
void ThreadLocalAllocBuffer::resize_all_tlabs() {
if (ResizeTLAB) {
*** 325,340 ****
size_t heap_words_remaining = _end - _top;
size_t bytes_left = bytes_until_sample();
size_t words_until_sample = bytes_left / HeapWordSize;
if (heap_words_remaining > words_until_sample) {
! set_end(_top + words_until_sample);
set_bytes_until_sample(0);
} else {
bytes_left -= heap_words_remaining * HeapWordSize;
set_bytes_until_sample(bytes_left);
}
}
Thread* ThreadLocalAllocBuffer::myThread() {
return (Thread*)(((char *)this) +
in_bytes(start_offset()) -
--- 326,349 ----
size_t heap_words_remaining = _end - _top;
size_t bytes_left = bytes_until_sample();
size_t words_until_sample = bytes_left / HeapWordSize;
if (heap_words_remaining > words_until_sample) {
! HeapWord* new_end = _top + words_until_sample;
! set_end(new_end);
! set_slow_path_end(new_end);
set_bytes_until_sample(0);
} else {
bytes_left -= heap_words_remaining * HeapWordSize;
set_bytes_until_sample(bytes_left);
}
+
+ log_trace(gc, tlab)("TLAB picked next sample: thread: " INTPTR_FORMAT " [id: %2d]"
+ " start: %p top: %p end: %p actual_end: %p slow_path_end: %p",
+ p2i(myThread()), myThread()->osthread()->thread_id(),
+ start(), top(), end(),
+ actual_end(), slow_path_end());
}
Thread* ThreadLocalAllocBuffer::myThread() {
return (Thread*)(((char *)this) +
in_bytes(start_offset()) -
< prev index next >