I thought FieldsAllocationStyle=2 was supposed to alternate between FieldsAllocationStyle=0 and 1 in an inheritance chain. But that doesn't seem to be the case in this example.
I was expecting the output to be something like this:
Instance field offsets for class D:
+12: [A] a1 : class java.lang.Object
+8: [A] a2 : int
+16: [B] b1 : class java.lang.Object
+20: [B] b2 : int
+24: [B] b3 : float
+36: [C] c1 : class java.lang.Object
+28: [C] c2 : float
+32: [C] c3 : int
+40: [D] d1 : class java.lang.Object
+44: [D] d2 : int
The changeset that introduced this new feature was made in April, 2010. http://hg.openjdk.java.net/jdk6/jdk6/hotspot/rev/b9d85fcdf743
Update: It works on 6u25 Linux x64, but not on 6u25/6u26 Windows x86.