--- old/src/share/vm/gc/shared/threadLocalAllocBuffer.inline.hpp 2015-12-01 12:06:25.490930219 +0100 +++ new/src/share/vm/gc/shared/threadLocalAllocBuffer.inline.hpp 2015-12-01 12:06:25.374930223 +0100 @@ -27,6 +27,7 @@ #include "gc/shared/collectedHeap.hpp" #include "gc/shared/threadLocalAllocBuffer.hpp" +#include "logging/log.hpp" #include "runtime/thread.hpp" #include "utilities/copy.hpp" @@ -66,18 +67,12 @@ 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); - } + log_trace(gc, tlab)("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); - } + log_trace(gc, tlab)("ThreadLocalAllocBuffer::compute_size(" SIZE_FORMAT ") returns " SIZE_FORMAT, + obj_size, new_tlab_size); return new_tlab_size; } @@ -91,15 +86,12 @@ _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()); - } + log_develop_trace(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