--- a/hotspot/src/cpu/sparc/vm/copy_sparc.hpp Thu Aug 25 20:29:30 2011 -0700
+++ b/hotspot/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) {