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

Xiaohong Gong xgong at openjdk.org
Mon Jul 24 02:31:05 UTC 2023


On Sat, 22 Jul 2023 03:21:49 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> The state of Valhalla document is not a specification, but a document about the general design of the Valhalla features in the VM. Currently, fields with L-descriptors are never flattened even the final ones. There are some non-trivial problems to be solved regarding their status before initialization and until we have a good solution to those problems, the safest option is to not flattened them.
>
>> The state of Valhalla document is not a specification, but a document about the general design of the Valhalla features in the VM. Currently, fields with L-descriptors are never flattened even the final ones. There are some non-trivial problems to be solved regarding their status before initialization and until we have a good solution to those problems, the safest option is to not flattened them.
> 
> null initialized L descriptor final fields may be tricky to handle, being pessimist looks appropriate in this case.

Sounds reasonable to me! It also reminds me that the value object JEP [1] said a value object can only be scalarized when it is on stack or passed through a method call in C2 compiler. 

So maybe changing to `!(too_big_to_flatten | too_atomic_to_flatten | too_volatile_to_flatten)` is safer for current status. WDYT @fparain  @jatin-bhateja ?
 
[1] https://openjdk.org/jeps/8277163

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

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



More information about the valhalla-dev mailing list