RFR (S) CR 8014964: @Contended breaks has_nonstatic_fields invariant
Aleksey Shipilev
aleksey.shipilev at oracle.com
Wed May 22 14:16:43 PDT 2013
Thanks for the ideas!
On 05/21/2013 08:14 PM, Vladimir Kozlov wrote:
>> Could you move third check on next line so you can see all on one screen?
Done.
>> You are right. So parsed_annotations->is_contended() is true for any
>> combinations of class and fields annotation. Right?
(parsed_annotations->is_contended() == true) iff (@Contended on class).
This is yet another thing to clean up.
>> This could be affected by alignment even more than your assert. Could
>> you look?
Hm... Ok, I can compare against the non-aligned offset. It can only not
equal the start if we do indeed have the fields.
But nonstatic_field_size still has the same problem. Moreover, assert
would seem to fail even in the simple case when the super-class is
@Contended; added the test case for that (class R4).
This is the current webrev:
http://cr.openjdk.java.net/~shade/8014964/webrev.03/
Testing:
- hotspot/test/runtime/contended/ regression tests (failing)
- JPRT cycle vs hotspot-rt is running now (just in case)
I actually start to wonder if no size/offset is reliable for this
assert; and counting the fields will yield the same expression over
fac[...], which is dumb to assert. The asserts there are only to fire
the regression test. Hence, this might seem to be that rare case where
the regression test is impractical?
-Aleksey.
More information about the hotspot-dev
mailing list