RFR: 8335977: Deoptimization fails with assert "object should be reallocated already"
Vladimir Ivanov
vlivanov at openjdk.org
Fri Oct 25 23:42:10 UTC 2024
On Mon, 21 Oct 2024 20:27:10 GMT, Cesar Soares Lucas <cslucas at openjdk.org> wrote:
> Please, review this patch to fix an issue that may occur when serializing debug information related to reduce allocation merges. The problem happens when there are more than one JVMS in a `uncommon_trap` and a _younger_ JVMS doesn't have the RAM inputs as a local/expression/monitor but an older JVMS does. In that situation the loop at line 1173 of output.cpp will set the `is_root` property of the ObjectValue to `false` when processing the younger JVMS even though it may have been set to `true` when visiting the older JVMS.
>
> Tested on:
> - Win, Mac & Linux tier1-4 on x64 & Aarch64.
> - CTW with some thousands of jars.
Looks good.
src/hotspot/share/opto/output.cpp line 1179:
> 1177: // the younger JVMS.
> 1178: if (ov->is_root()) {
> 1179: continue;
You can either fuse `ov->is_root()` check into `is_root` computation (`bool is_root = ov->is_root() || ...`) or turn it into an `if-then-else` (`if (ov->is_root()) { /* comment */ } else { bool is_root = ...; ov->set_root(is_root); }`). I find both cases easier to read.
-------------
Marked as reviewed by vlivanov (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/21624#pullrequestreview-2396740081
PR Review Comment: https://git.openjdk.org/jdk/pull/21624#discussion_r1817451037
More information about the hotspot-compiler-dev
mailing list