Mercurial > hg > graal-compiler
diff src/cpu/sparc/vm/copy_sparc.hpp @ 3892:baf763f388e6
7059037: Use BIS for zeroing on T4
Summary: Use BIS for zeroing new allocated big (2Kb and more) objects and arrays.
Reviewed-by: never, twisti, ysr
author | kvn |
---|---|
date | Fri, 26 Aug 2011 08:52:22 -0700 |
parents | f95d63e2154a |
children | 16f9fa2bf76c |
line wrap: on
line diff
--- a/src/cpu/sparc/vm/copy_sparc.hpp Thu Aug 25 20:29:30 2011 -0700 +++ b/src/cpu/sparc/vm/copy_sparc.hpp Fri Aug 26 08:52:22 2011 -0700 @@ -156,9 +156,16 @@ #endif // _LP64 } +typedef void (*_zero_Fn)(HeapWord* to, size_t count); + static void pd_fill_to_aligned_words(HeapWord* tohw, size_t count, juint value) { assert(MinObjAlignmentInBytes >= BytesPerLong, "need alternate implementation"); + if (value == 0 && UseBlockZeroing && + (count > (BlockZeroingLowLimit >> LogHeapWordSize))) { + // Call it only when block zeroing is used + ((_zero_Fn)StubRoutines::zero_aligned_words())(tohw, count); + } else { julong* to = (julong*)tohw; julong v = ((julong)value << 32) | value; // If count is odd, odd will be equal to 1 on 32-bit platform @@ -176,6 +183,7 @@ *((juint*)to) = value; } + } } static void pd_fill_to_bytes(void* to, size_t count, jubyte value) {