RFR: 8286446: PPC64: fix crashes after JDK-8284161 (virtual threads preview)

Martin Doerr mdoerr at openjdk.java.net
Tue May 10 10:41:49 UTC 2022


On Mon, 9 May 2022 22:45:49 GMT, Richard Reingruber <rrich at openjdk.org> wrote:

> With this change `java -version` succeeds with the devkit build also the standard build on a ppc64le box does not crash anymore.
> 
> Also tier1 tests don't look too bad.

Looks great! Thanks for fixing PPC64 so quickly! I only have a few minor requests. Otherwise, good to go.

src/hotspot/cpu/ppc/frame_ppc.cpp line 239:

> 237:   }
> 238:   assert(!Continuation::is_return_barrier_entry(*pc_addr), "return barrier");
> 239:   assert(_pc == *pc_addr || pc == *pc_addr || *pc_addr == 0, "must be (pc: " INTPTR_FORMAT " _pc: " INTPTR_FORMAT " pc_addr: " INTPTR_FORMAT " *pc_addr: " INTPTR_FORMAT  " sp: " INTPTR_FORMAT ")", p2i(pc), p2i(_pc), p2i(pc_addr), p2i(*pc_addr), p2i(sp()));

Please break down this huge line! (Optional: I think having *pc_addr always on the same side would be a bit better readable.)

src/hotspot/cpu/ppc/frame_ppc.inline.hpp line 36:

> 34: // Inline functions for ppc64 frames:
> 35: 
> 36: // Initialize frame members

Add `(_pc and _sp must be given)`?

src/hotspot/cpu/ppc/frame_ppc.inline.hpp line 106:

> 104:   // In thaw, non-heap frames use this constructor to pass oop_map.  I don't know why.
> 105:   assert(_on_heap || _cb != nullptr, "these frames are always heap frames");
> 106:   if (cb != NULL) {

Wouldn't usability be better without this check? (Call `setup()` regardless of `cb` provided or not.) Or is there any reason?

src/hotspot/cpu/ppc/frame_ppc.inline.hpp line 109:

> 107:     setup();
> 108:   }
> 109: #ifdef ASSERT

(Redundant.)

src/hotspot/share/runtime/signature.cpp line 265:

> 263:       _fp_args++;
> 264:     } else {
> 265:       PPC64_ONLY(_stack_arg_slots = align_up(_stack_arg_slots, 2));

Looks good. Alternatively, we could think about dropping alignment on PPC64, but I think such changes could be done later (improvements of other platforms may also be worth being discussed). Your version fits to the current PPC64 platform code.

-------------

Marked as reviewed by mdoerr (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/8617


More information about the hotspot-dev mailing list