RFR: 8345067: C2: enable implicit null checks for ZGC reads [v5]
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Fri May 30 12:32:56 UTC 2025
On Sat, 17 May 2025 09:04:28 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> OK. C2 does not currently support creating exception table entries with arbitrary offsets relative to the start address of the code emitted for a Mach node, so that support would have to be added. I prototyped this support [here](https://github.com/openjdk/jdk/compare/master...robcasloz:jdk:JDK-implicit-null-checks), see calls to `record_exception_pc_offset()`. I don't think it is, overall, simpler than the approach proposed in this PR - definitely not from a `PhaseOutput`/`C2_MacroAssembler` perspective. But if you still think it is worth exploring, I will create a new prototype with the `record_exception_pc_offset()` on top of this PR to make it easier to compare.
>
> I don't think you have to do that. I think you only have to mark both the lea and the memory access with an exception table entry. The segfault handler sees the two entries, deduces that this access is split into two instructions, and does the right thing.
@theRealAph do you have time to look into this, or should I proceed with the PR in its current form? The main bulk of the change is orthogonal to this discussion, and we can always revisit this part in a separate RFE if necessary.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25066#discussion_r2115840786
More information about the hotspot-gc-dev
mailing list