RFR: 8343343: Misc crash dump improvements on more platforms after JDK-8294160 [v4]

Martin Doerr mdoerr at openjdk.org
Wed Nov 6 11:04:53 UTC 2024


> [JDK-8294160](https://bugs.openjdk.org/browse/JDK-8294160) has improved `os::print_tos_pc` for some platforms. This PR extends it to more platforms. I have moved it into shared code and made it generic.
> In addition, `fetch_frame_from_context(const void* ucVoid)` checks the pc on more platforms, now. If it's bad, we use the caller PC instead.
> 
> Note that the address 0 is readable on AIX. Therefore, it requires an extra null check. Tested by
> 
> diff --git a/src/hotspot/cpu/ppc/ppc.ad b/src/hotspot/cpu/ppc/ppc.ad
> index 6d3daa025e8..0f8de648d53 100644
> --- a/src/hotspot/cpu/ppc/ppc.ad
> +++ b/src/hotspot/cpu/ppc/ppc.ad
> @@ -1557,6 +1557,12 @@ void MachPrologNode::emit(C2_MacroAssembler *masm, PhaseRegAlloc *ra_) const {
>      __ std(return_pc, _abi0(lr), callers_sp);
>    }
>  
> +  if (UseNewCode) {
> +    __ li(R0, 0);
> +    __ mtctr(R0);
> +    __ bctrl();
> +  }
> +
>    if (C->stub_function() == nullptr) {
>      BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
>      bs->nmethod_entry_barrier(masm, push_frame_temp);
> 
> 
> The new version shows the "Instructions:" section at the caller PC which was missing on some platforms before this PR.

Martin Doerr has updated the pull request incrementally with one additional commit since the last revision:

  Arm32 part from Boris.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/21809/files
  - new: https://git.openjdk.org/jdk/pull/21809/files/62eee71a..a67a38f1

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=21809&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=21809&range=02-03

  Stats: 18 lines in 1 file changed: 18 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/21809.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/21809/head:pull/21809

PR: https://git.openjdk.org/jdk/pull/21809


More information about the hotspot-runtime-dev mailing list