RFR: 8299795: Relativize locals in interpreter frames [v4]
Martin Doerr
mdoerr at openjdk.org
Wed Jan 18 05:10:26 UTC 2023
On Tue, 17 Jan 2023 17:02:04 GMT, Fredrik Bredberg <duke at openjdk.org> wrote:
>> src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp line 1035:
>>
>>> 1033: __ sub(R12_scratch2, R18_locals, R1_SP);
>>> 1034: __ srdi(R12_scratch2, R12_scratch2, Interpreter::logStackElementSize);
>>> 1035: // Now &fp()[R12_scratch2] == R18_locals
>>
>> I think this comment makes no sense. Please remove it. Otherwise, PPC64 code LGTM.
>
> My intention was to show how the contents of R18_locals (the absolute address to locals) can be recreated by using R12_scratch2 as an index from the frame pointer. Before we stored R18_locals in the stackframe, now we store R12_scratch2. Does that make more sense?
The code uses &sp()[R12_scratch2]. I think your comment is confusing. Please remove it or write something comprehensive. E.g. save R18_locals in compressed format relative to the frame's SP.
-------------
PR: https://git.openjdk.org/jdk/pull/11902
More information about the serviceability-dev
mailing list