RFR(M): optional flattening - interpreter/runtime part

Tobias Hartmann tobias.hartmann at oracle.com
Thu Sep 14 07:46:35 UTC 2017


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.

Thanks,
Tobias

On 13.09.2017 21:41, Frederic Parain wrote:
> Greetings,
> 
> 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.
> 
> http://cr.openjdk.java.net/~fparain/optional-flattening-interp/webrev.00/index.html
> 
> 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,
> 
> Fred
> 



More information about the valhalla-dev mailing list