RFR: 8241613: Suspicious calls to MacroAssembler::null_check(Register, offset) [v2]
Matias Saavedra Silva
matsaave at openjdk.org
Wed Mar 22 21:31:43 UTC 2023
On Tue, 21 Mar 2023 11:57:04 GMT, Frederic Parain <fparain at openjdk.org> wrote:
>> Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision:
>>
>> load_klass now emits null check and other platforms supported
>
> The nulll_check() method is perfectly fine, and complements the work done in the signal handler for segmentation fault in the first page. But my point was not about the method itself, it was about cases where this method is used when it is provable that there's no need to insert an explicit null check because the signal handler is able to handle the case. It happens when the offset is statically known at VM compilation time, and this offset is smaller than a page size: the klass pointer offset and the array's length.
> But if you consider that the code is safer as written in its current form, I'll close the bug as not-an-issue. Anyway, it doesn't change the code being generated.
Thank you all for the insightful comments! The most recent commit removed load_klass_null_check entirely for all platforms except PPC which has unique behavior. This should be consistent with the prior behavior of this code and, as @fparain stated, is simply cleanup.
If there is any further disagreement on what should be done in this PR, I can revert it to a draft until we have come to a consensus.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13026#issuecomment-1480285307
More information about the hotspot-runtime-dev
mailing list