[aarch64-port-dev ] [12] RFR(S): 8207247 AARCH64: Enable Minimal and Client VM builds

Andrew Haley aph at redhat.com
Wed Aug 29 12:13:59 UTC 2018


On 08/29/2018 12:54 PM, Aleksei Voitylov wrote:

> please review this patch which adds Minimal and Client VM support to 
> AARCH64 port.
> 
> Enhancement: https://bugs.openjdk.java.net/browse/JDK-8207247
> Webrev: http://cr.openjdk.java.net/~avoitylov/webrev.8207247.01

It looks fine, except for this:

@@ -741,13 +746,17 @@

   // We need a trampoline if branches are far.
   if (far_branches()) {
+    bool emit_trampoline = true;
+#ifdef COMPILER2
     // We don't want to emit a trampoline if C2 is generating dummy
     // code during its branch shortening phase.
     CompileTask* task = ciEnv::current()->task();
-    bool in_scratch_emit_size =
-      (task != NULL && is_c2_compile(task->comp_level()) &&
-       Compile::current()->in_scratch_emit_size());
-    if (!in_scratch_emit_size) {
+    if (task != NULL && is_c2_compile(task->comp_level())
+        && Compile::current()->in_scratch_emit_size()) {
+      emit_trampoline = false;
+    }
+#endif
+    if(emit_trampoline) {
       address stub = emit_trampoline_stub(offset(), entry.target());
       if (stub == NULL) {
         return NULL; // CodeCache is full

Which changes too much code. All you need to do is hoist the declaration
of in_scratch_emit_size out of the ifdef COMPILER2 region; the rest of
the code is still valid.

Thanks.

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


More information about the aarch64-port-dev mailing list