aarch64: RFR: Block zeroing by 'DC ZVA'
Andrew Haley
aph at redhat.com
Sat Apr 16 07:59:38 UTC 2016
+ void dc(cache_maintenance cm, Register Rt) {
+ sys(0b011, 0b0111, cm, 0b001, Rt);
+ }
+
+ void ic(cache_maintenance cm, Register Rt) {
+ sys(0b011, 0b0111, cm, 0b001, Rt);
}
Are DC and IC really synonyms?
+typedef void (*_zero_Fn)(HeapWord* to, size_t count);
+
static void pd_fill_to_aligned_words(HeapWord* tohw, size_t count, juint value) {
- pd_fill_to_words(tohw, count, value);
+ if (UseBlockZeroing
+ && value == 0
+ && count >= (size_t)(BlockZeroingLowLimit >> LogHeapWordSize)) {
+ ((_zero_Fn)StubRoutines::zero_aligned_words())(tohw, count);
+ }
+ else {
+ pd_fill_to_words(tohw, count, value);
+ }
}
I'm not convinced of the value of this. We already know that a simple
while (count-- > 0) {
*to++ = v;
}
turns into a call to memset() which does DC ZVA.
diff --git a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
--- a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
+++ b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
@@ -4670,11 +4670,54 @@
BLOCK_COMMENT(is_string ? "} string_equals" : "} array_equals");
}
+
+// base: Address of a buffer to be zeroed, 8 bytes aligned.
+// cnt: Count in 8-byte unit.
+// is_large: True when 'cnt' is known to be >= BlockZeroingLowLimit.
+void MacroAssembler::zero_words(Register base, Register cnt, bool is_large)
+{
+ if (UseBlockZeroing) {
+ Label non_block_zeroing;
+ block_zeroing(base, cnt, non_block_zeroing, is_large);
Always use the imperative form of a verb for methods: "block_zero",
not, "block_zeroing".
// base: Address of a buffer to be zeroed, 8 bytes aligned.
-// cnt: Count in 8-byte unit.
-void MacroAssembler::zero_words(Register base, Register cnt)
+// cnt: Immediate count in 8-byte unit.
Please make this
// cnt: count in HeapWords
Thanks,
Andrew.
More information about the hotspot-compiler-dev
mailing list