RFR (S) CR 8014886: @Contended fields can overrun oop maps
Vladimir Kozlov
vladimir.kozlov at oracle.com
Tue May 21 07:40:32 PDT 2013
Code is good.
On 5/21/13 2:03 AM, Aleksey Shipilev wrote:
> Thanks Vladimir!
>
> The updated webrev is here:
> http://cr.openjdk.java.net/~shade/8014886/webrev.02/
>
> On 05/21/2013 07:58 AM, Vladimir Kozlov wrote:
>> Is not has_nonstatic_fields also wrong?
>
> Yes, it is. I haven't fixed this here for three reasons:
> a) this is not about oop maps
> b) tracked down the impact through the HS code, seems minimal
> c) because of (b): I'm still trying to get proper regression test for
> has_nonstatic_fields ready
Okay.
>
> I will post another CR for fixing that one up.
>
>> Rename: max_oop_maps -> max_nonstatic_oop_maps.
>
> Done.
>
>> For FieldsAllocationStyle=2 (default) we do special oop fields layout
>> for super and subclass to have only one oopmap. You need to add non-oop
>> fields (class in your test has only oop fields) to test different layouts.
>
> Done. I had also the super-class to get the oops aligned in the oop chunk.
>
>> Next added mess to already complicated code:
>>
>> 3188 unsigned int nonstatic_double_count =
>> fac->count[NONSTATIC_DOUBLE] - fac_contended.count[NONSTATIC_DOUBLE];
>> 3189 unsigned int nonstatic_word_count = fac->count[NONSTATIC_WORD]
>> - fac_contended.count[NONSTATIC_WORD];
>> 3190 unsigned int nonstatic_short_count = fac->count[NONSTATIC_SHORT]
>> - fac_contended.count[NONSTATIC_SHORT];
>> 3191 unsigned int nonstatic_byte_count = fac->count[NONSTATIC_BYTE]
>> - fac_contended.count[NONSTATIC_BYTE];
>> 3192 unsigned int nonstatic_oop_count = fac->count[NONSTATIC_OOP]
>> - fac_contended.count[NONSTATIC_OOP];
>
>> At least add comment that these counts are for not contended fields.
>
> Already taken care of in the baseline: there is a terse comment. I will
> clean up that mess during further cleanup work. The regression tests
> like this one will help to build enough safety net for the refactoring.
thanks,
Vladimir
>
> -Aleksey.
>
More information about the hotspot-dev
mailing list