RFR: 8343343: Misc crash dump improvements on more platforms after JDK-8294160 [v3]
Martin Doerr
mdoerr at openjdk.org
Tue Nov 5 13:50:32 UTC 2024
On Thu, 31 Oct 2024 15:56:06 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:
>> [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:
>
> Revert arm and Windows aarch64 parts because fetch_compiled_frame_from_context doesn't exist.
Thanks for the review! I'll wait a bit. Maybe we'll get an arm32 part from @bulasevich.
Maybe @dean-long as the author of [JDK-8294160](https://bugs.openjdk.org/browse/JDK-8294160) would like to take a look, too?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21809#issuecomment-2457224319
More information about the hotspot-runtime-dev
mailing list