[vector-unstable] Miscellaneous cleanups in hotspot

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Thu Jul 23 13:14:40 UTC 2020


Thanks, Sandhya.

I can't reproduce it with vector-unstable. I believe you applied the 
patch to vectorIntrinsics branch.

I propose this patch to go into vector-unstable instead and then merge 
with vectorIntrinsics once it reaches jdk/jdk.

Regarding the crash, my analysis is it's a bug in late inlining of 
virtual calls triggered by restoring lazy cleanup logic:

diff --git a/src/hotspot/share/opto/compile.cpp 
b/src/hotspot/share/opto/compile.cpp
--- a/src/hotspot/share/opto/compile.cpp
+++ b/src/hotspot/share/opto/compile.cpp
@@ -1887,7 +1887,7 @@

    print_method(PHASE_INCREMENTAL_INLINE_STEP, 3);

-  bool needs_cleanup = true;
+  bool needs_cleanup = do_cleanup() || over_inlining_cutoff();

    set_inlining_progress(false);
    set_do_cleanup(false);

The following patch fixes the crash in vectorIntrinsics for me:

diff --git a/src/hotspot/share/opto/compile.cpp 
b/src/hotspot/share/opto/compile.cpp
--- a/src/hotspot/share/opto/compile.cpp
+++ b/src/hotspot/share/opto/compile.cpp
@@ -1918,6 +1918,8 @@
      for_igvn()->clear();
      initial_gvn()->replace_with(&igvn);

+    _late_inlines_pos = _late_inlines.length();
+
      while (inline_incrementally_virtual_one()) {
        assert(!failing(), "inconsistent");
      }

I'll integrate it separately.

Best regards,
Vladimir Ivanov

On 23.07.2020 03:12, Viswanathan, Sandhya wrote:
> Hi Vladimir,
> 
> Your changes look good.
> 
> One more fix is needed in compile.cpp:
> --- a/src/hotspot/share/opto/compile.cpp        Thu Jul 16 11:19:07 2020 -0700
> +++ b/src/hotspot/share/opto/compile.cpp     Wed Jul 22 17:03:02 2020 -0700
> @@ -1883,6 +1883,7 @@
>       _late_inlines.at_put(j, _late_inlines.at(i));
>     }
>     _late_inlines.trunc_to(j);
> +  _late_inlines_pos = j;
>     assert(inlining_progress() || _late_inlines.length() == 0, "");
> 
>     print_method(PHASE_INCREMENTAL_INLINE_STEP, 3);
> 
> I am seeing occasion crashes at:
> #  Internal Error (src/hotspot/share/utilities/growableArray.hpp:384), pid=32243, tid=32257
> #  assert(0 <= idx && idx <= this->_len) failed: illegal index
> 
> The call stack at crash:
> V  [libjvm.so+0x7a2654]  LateInlineCallGenerator::generate(JVMState*)+0x104
> V  [libjvm.so+0xa6aca0]  Parse::do_call()+0x4d0
> V  [libjvm.so+0x13b62bc]  Parse::do_one_bytecode()+0x1ccc
> 
> Best Regards,
> Sandhya
> 
> -----Original Message-----
> From: panama-dev <panama-dev-retn at openjdk.java.net> On Behalf Of Vladimir Ivanov
> Sent: Wednesday, July 22, 2020 2:18 PM
> To: panama-dev <panama-dev at openjdk.java.net>
> Subject: [vector-unstable] Miscellaneous cleanups in hotspot
> 
> http://cr.openjdk.java.net/~vlivanov/panama/vector-unstable/cleanup.01/webrev.00/
> 
> One more round of miscellaneous cleanups in shared code to minimize noise in the diff against mainline.
> 
> Testing: test/jdk/jdk/incubator/vector/
> 
> The patch is against vector-unstable branch.
> 
> Best regards,
> Vladimir Ivanov
> 


More information about the panama-dev mailing list