RFR: 8343343: Misc crash dump improvements on more platforms after JDK-8294160 [v2]
Martin Doerr
mdoerr at openjdk.org
Thu Oct 31 15:35:03 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 all 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 all 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:
Remove redundant os:: qualifier.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/21809/files
- new: https://git.openjdk.org/jdk/pull/21809/files/4d6bee5b..160b353d
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=21809&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=21809&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 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