< prev index next >

src/share/vm/gc/shared/threadLocalAllocBuffer.inline.hpp

Print this page

        

*** 25,34 **** --- 25,35 ---- #ifndef SHARE_VM_GC_SHARED_THREADLOCALALLOCBUFFER_INLINE_HPP #define SHARE_VM_GC_SHARED_THREADLOCALALLOCBUFFER_INLINE_HPP #include "gc/shared/collectedHeap.hpp" #include "gc/shared/threadLocalAllocBuffer.hpp" + #include "logging/log.hpp" #include "runtime/thread.hpp" #include "utilities/copy.hpp" inline HeapWord* ThreadLocalAllocBuffer::allocate(size_t size) { invariants();
*** 64,85 **** // Make sure there's enough room for object and filler int[]. const size_t obj_plus_filler_size = aligned_obj_size + alignment_reserve(); if (new_tlab_size < obj_plus_filler_size) { // If there isn't enough room for the allocation, return failure. ! if (PrintTLAB && Verbose) { ! gclog_or_tty->print_cr("ThreadLocalAllocBuffer::compute_size(" SIZE_FORMAT ")" ! " returns failure", obj_size); - } return 0; } ! if (PrintTLAB && Verbose) { ! gclog_or_tty->print_cr("ThreadLocalAllocBuffer::compute_size(" SIZE_FORMAT ")" ! " returns " SIZE_FORMAT, obj_size, new_tlab_size); - } return new_tlab_size; } void ThreadLocalAllocBuffer::record_slow_allocation(size_t obj_size) { --- 65,80 ---- // Make sure there's enough room for object and filler int[]. const size_t obj_plus_filler_size = aligned_obj_size + alignment_reserve(); if (new_tlab_size < obj_plus_filler_size) { // If there isn't enough room for the allocation, return failure. ! log_trace(gc, tlab)("ThreadLocalAllocBuffer::compute_size(" SIZE_FORMAT ") returns failure", obj_size); return 0; } ! log_trace(gc, tlab)("ThreadLocalAllocBuffer::compute_size(" SIZE_FORMAT ") returns " SIZE_FORMAT, obj_size, new_tlab_size); return new_tlab_size; } void ThreadLocalAllocBuffer::record_slow_allocation(size_t obj_size) {
*** 89,105 **** set_refill_waste_limit(refill_waste_limit() + refill_waste_limit_increment()); _slow_allocations++; ! if (PrintTLAB && Verbose) { ! Thread* thrd = myThread(); ! gclog_or_tty->print("TLAB: %s thread: " INTPTR_FORMAT " [id: %2d]" " obj: " SIZE_FORMAT " free: " SIZE_FORMAT ! " waste: " SIZE_FORMAT "\n", ! "slow", p2i(thrd), thrd->osthread()->thread_id(), obj_size, free(), refill_waste_limit()); - } } #endif // SHARE_VM_GC_SHARED_THREADLOCALALLOCBUFFER_INLINE_HPP --- 84,97 ---- set_refill_waste_limit(refill_waste_limit() + refill_waste_limit_increment()); _slow_allocations++; ! log_develop(gc, tlab)("TLAB: %s thread: " INTPTR_FORMAT " [id: %2d]" " obj: " SIZE_FORMAT " free: " SIZE_FORMAT ! " waste: " SIZE_FORMAT, ! "slow", p2i(myThread()), myThread()->osthread()->thread_id(), obj_size, free(), refill_waste_limit()); } #endif // SHARE_VM_GC_SHARED_THREADLOCALALLOCBUFFER_INLINE_HPP
< prev index next >