Mercurial > hg > truffle
diff src/share/vm/memory/threadLocalAllocBuffer.hpp @ 3854:1af104d6cf99
7079329: Adjust allocation prefetching for T4
Summary: on T4 2 BIS instructions should be issued to prefetch 64 bytes
Reviewed-by: iveresov, phh, twisti
author | kvn |
---|---|
date | Tue, 16 Aug 2011 16:59:46 -0700 |
parents | b1a2afa37ec4 |
children | d2a62e0f25eb |
line wrap: on
line diff
--- a/src/share/vm/memory/threadLocalAllocBuffer.hpp Tue Aug 16 11:53:57 2011 -0700 +++ b/src/share/vm/memory/threadLocalAllocBuffer.hpp Tue Aug 16 16:59:46 2011 -0700 @@ -124,16 +124,7 @@ // Reserve space at the end of TLAB static size_t end_reserve() { int reserve_size = typeArrayOopDesc::header_size(T_INT); - if (AllocatePrefetchStyle == 3) { - // BIS is used to prefetch - we need a space for it. - // +1 for rounding up to next cache line +1 to be safe - int lines = AllocatePrefetchLines + 2; - int step_size = AllocatePrefetchStepSize; - int distance = AllocatePrefetchDistance; - int prefetch_end = (distance + step_size*lines)/(int)HeapWordSize; - reserve_size = MAX2(reserve_size, prefetch_end); - } - return reserve_size; + return MAX2(reserve_size, VM_Version::reserve_for_allocation_prefetch()); } static size_t alignment_reserve() { return align_object_size(end_reserve()); } static size_t alignment_reserve_in_bytes() { return alignment_reserve() * HeapWordSize; }