RFR(M): optional flattening - interpreter/runtime part
frederic.parain at oracle.com
Tue Sep 19 21:24:25 UTC 2017
Here’s an updated webrev:
- code has been updated according to the recent interpreter changes
- the issue with oop_map generation in layout_fields() has now a correct fix
- A test in ValueOops has been commented because it has to be revisited
with the introduction of optional flattening, but I’d like to discuss this topic
with David Simms on a different CR.
> On Sep 14, 2017, at 11:03, Tobias Hartmann <tobias.hartmann at oracle.com> wrote:
> Hi Fred,
> I've just verified that the problem is solved with your latest webrev!
> On 14.09.2017 16:50, Frederic Parain wrote:
>> Thank you for catching that.
>> There’s a bug in the layout computation, optional flattening code moves non-flattened
>> values from the value types section of the layout to the nonstatic_oop section, but the size
>> of the later was not updated accordingly.
>> Here’s an updated webrev fixing this issue:
>>> On Sep 14, 2017, at 03:46, Tobias Hartmann <tobias.hartmann at oracle.com> wrote:
>>> Hi Fred,
>>> there seems to be a problem with the field layout:
>>> compiler.valhalla.valuetypes.MyValue1: field layout
>>> @ 16 --- instance fields start ---
>>> @ 24 "x" I
>>> @ 16 "y" J
>>> @ 32 "z" S
>>> @ 40 "o" Ljava.lang.Integer;
>>> @ 48 "oa" [I
>>> @ 56 "v1" Qcompiler.valhalla.valuetypes.MyValue2;
>>> @ 64 "v2" Qcompiler.valhalla.valuetypes.MyValue2;
>>> @ 28 "c" I
>>> @ 56 --- instance fields end ---
>>> @ 56 --- instance ends ---
>>> @176 --- static fields start ---
>>> @192 "s" I
>>> @184 "sf" J
>>> @176 "v3" Qcompiler.valhalla.valuetypes.MyValue2;
>>> @200 --- static fields end ---
>>> OopMapBlocks: 1 / 4
>>> Offset: 40 - 64 Count: 4
>>> "instance fields end" points to offset 56 which is not correct because the non-flattened field v2 is at offset 64.
>>> On 13.09.2017 21:41, Frederic Parain wrote:
>>>> Please review this changeset implementing optional field flattening
>>>> in the interpreter and the runtime. The support for C2 is provided by
>>>> Tobias in a separate changeset.
>>>> Note that trying to run some programs/tests with this changeset and
>>>> not Tobias’ changeset is likely to cause crashes unless interpreted mode
>>>> is forced and passing/returning values in registers is disabled.
>>>> Thank you,
More information about the valhalla-dev