[aarch64-port-dev ] Issue with cppool and permgen compaction in JDK7

Andrew Dinn adinn at redhat.com
Thu Oct 9 18:18:13 UTC 2014


I have identified the problem which was causing javac to fail when
running (with -Xint) on the current jdk7-aarch64 JVM.

Permgen compaction was occuring under a new operation and ended up
relocating the constantPoolCache of the method doing the new. The GC
correctly updated the stack pointer but left the rcpool register
unchanged. That's because the current AArch64 code does not restore the
cpcache after a VM callout (ok for JDK8 where there is no Permgen but
not for JDK7).

I fixed this by patching InterpreterMacroAssembler::call_VM_base as follows

diff -r b96ed8ce0010 src/cpu/aarch64/vm/interp_masm_aarch64.cpp
--- a/src/cpu/aarch64/vm/interp_masm_aarch64.cpp	Wed Sep 10 16:29:13
2014 +0100
+++ b/src/cpu/aarch64/vm/interp_masm_aarch64.cpp	Thu Oct 09 19:12:05
2014 +0100
@@ -1458,5 +1458,7 @@
 // interpreter specific
   restore_bcp();
   restore_locals();
+  // reload the constant pool cache in case a PermGen GC moved it
+  restore_constant_pool_cache();
 }

With that fix and javac -Xint Hello.java now runs to completion. Does
this look right? Or is there a better fix? If it's ok then I'll commit
and move on to debugging C1 and C1 enough that we can do some more
serious testing.

regards,


Andrew Dinn
-----------



More information about the aarch64-port-dev mailing list