[lworld] RFR: 8311219: [lworld] VM option "InlineFieldMaxFlatSize" cannot work well [v4]

Xiaohong Gong xgong at openjdk.org
Thu Sep 7 06:56:07 UTC 2023


On Thu, 7 Sep 2023 06:24:48 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> Xiaohong Gong has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits:
>> 
>>  - Merge 'valhalla:lworld' into JDK-8311219
>>  - Fix "assert(field->type()->as_inline_klass()->is_initialized()) failed: Must be"
>>  - Not flatten L-descriptor value object field even it is final
>>  - 8311219: [lworld] VM option "InlineFieldMaxFlatSize" cannot work well
>
> src/hotspot/share/opto/inlinetypenode.cpp line 147:
> 
>> 145:     if (val1->is_InlineType()) {
>> 146:       if (val2->is_Phi()) {
>> 147:         val2 = gvn->transform(val2);
> 
> Can you also add an assertion check here to ensure val2 is always an InlineTypeNode which was pushed forward through PhiNode. Please add a test case exercising this control flow, if a test already exist then kindly mention it on this PR.

`val2->as_InlineType()` has already contained the assertion. This original code makes test `compiler.valhalla.inlinetypes.TestNullableArrays` crashes with:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/mnt/local/code/valhalla/src/hotspot/share/opto/node.hpp:977), pid=302375, tid=302391
#  assert(is_InlineType()) failed: invalid node class: Phi
#
# JRE version: OpenJDK Runtime Environment (22.0) (fastdebug build 22-internal-git-a477e90b5)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 22-internal-git-a477e90b5, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# V  [libjvm.so+0xdbeaf8]  Node::as_InlineType() const [clone .part.0]+0x18
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /mnt/local/code/jtreg/jtreg-git/build/images/jtreg/jtwork/hotspot/scratch/8/core.302375)
#
Unsupported internal testing APIs have been used.


So I think it can touch this control flow?

-------------

PR Review Comment: https://git.openjdk.org/valhalla/pull/888#discussion_r1318160548



More information about the valhalla-dev mailing list