RFR (S) CR 8014964: @Contended breaks has_nonstatic_fields invariant

Aleksey Shipilev aleksey.shipilev at oracle.com
Wed May 22 15:31:35 PDT 2013


On 05/23/2013 02:09 AM, Vladimir Kozlov wrote:
>> Testing:
>>    - hotspot/test/runtime/contended/ regression tests (failing)
> 
> Could you run all hotspot/test tests (you have to list them)? It should
> not take long.

Yes, I can. Let me re-spin the testing for this one.

>>    - 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?
> 
> The asserts and test are a protection from future bugs in this code (as
> most of other asserts in VM). This code is complex and is easy to screw
> up :)

Yes, I know that. My inclination though is to omit the assert for
has_nonstatic_fields, because we can not reliably assert it. For
example, if you run the valid regression test (contended/HasNonStatic),
it will fail on that assert. Am I missing some good way to test
has_nonstatic_fields without putting exactly the same expression over
fac[...] in the assert?

-Aleksey.


More information about the hotspot-dev mailing list