RFR (S) CR 8008965: @Contended fails with classes having static fields

Aleksey Shipilev aleksey.shipilev at oracle.com
Tue Mar 5 11:37:58 PST 2013


Anyone? :)

-Aleksey.

On 02/26/2013 02:19 PM, Aleksey Shipilev wrote:
> Hi,
> 
> The jsr166 testing shows @Contended fails with the classes having the
> static fields. The bottom line for the issue is that HS maintains
> contiguous area of static oops within the class, and injecting padding
> there breaks the field walk logic.
> 
> This does not break the usual builds, because that code is not used
> unless you have @Contended classes (in some regard, that's why it
> slipped testing before).
> 
> Fixing @Contended to work with static fields will require substantial
> amount of redo in static oops map code, so at this point it seems
> beneficial to just no-op the @Contended effect for static fields:
>   http://cr.openjdk.java.net/~shade/8008965/webrev.00/
> 
> Our primary use cases involve instance fields, so this shoves off the
> low priority functionality. After we commit this fix, does anyone has
> the problem with doing static oops maps in the same way we deal with
> instance oops maps in the class?
> 
> Testing:
>   - full JPRT cycle with hotspot-rt
>   - targeted jsr166 builds with @Contended
>   - 8003985 regression test
> 
> -Aleksey.
> 



More information about the hotspot-runtime-dev mailing list