[aarch64-port-dev ] /hg/icedtea7-forest-aarch64/hotspot: ensure byte_map_base can be...

adinn at icedtea.classpath.org adinn at icedtea.classpath.org
Thu Oct 30 14:50:42 UTC 2014


changeset eff2294b2b17 in /hg/icedtea7-forest-aarch64/hotspot
details: http://icedtea.classpath.org/hg/icedtea7-forest-aarch64/hotspot?cmd=changeset;node=eff2294b2b17
author: adinn
date: Thu Oct 30 10:46:37 2014 -0400

	ensure byte_map_base can be loaded using adrp with no need for following ldr

	on AArch64 we want the card table base to be aligned to 4K so we can
	load using a single adrp with no need to load an offset. this means
	the heap needs to be aligned at 2Mb (i.e 256K heapwords). that's
	because byte_map_base is calculated as (byte_map - (heap_base >> 9))


diffstat:

 src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp                               |  1 +
 src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp |  6 +++++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diffs (28 lines):

diff -r 5b7dcf16fe5d -r eff2294b2b17 src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp
--- a/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp	Tue Oct 21 05:09:50 2014 -0400
+++ b/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp	Thu Oct 30 10:46:37 2014 -0400
@@ -1235,6 +1235,7 @@
         __ lsr(card_addr, card_addr, CardTableModRefBS::card_shift);
 	unsigned long offset;
 	__ adrp(rscratch1, cardtable, offset);
+	assert(offset == 0, "assumed offset == 0");
         __ add(card_addr, card_addr, rscratch1);
         __ ldrb(rscratch1, Address(card_addr, offset));
         __ cmpw(rscratch1, (int)G1SATBCardTableModRefBS::g1_young_card_val());
diff -r 5b7dcf16fe5d -r eff2294b2b17 src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp
--- a/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp	Tue Oct 21 05:09:50 2014 -0400
+++ b/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp	Thu Oct 30 10:46:37 2014 -0400
@@ -129,8 +129,12 @@
 
   // The alignment used for eden and survivors within the young gen
   // and for boundary between young gen and old gen.
+#ifdef TARGET_ARCH_aarch64
+  // ensure byte_map_base can be loaded using adrp with no following ldr
+  size_t intra_heap_alignment() const { return 256 * K * HeapWordSize; }
+#else
   size_t intra_heap_alignment() const { return 64 * K * HeapWordSize; }
-
+#endif
   size_t capacity() const;
   size_t used() const;
 


More information about the aarch64-port-dev mailing list