RFR (S): 8188133: C2: Static field accesses in clinit can trigger deoptimizations
nils.eliasson at oracle.com
Fri Feb 1 09:22:42 UTC 2019
On 2019-01-31 20:29, Vladimir Ivanov wrote:
> The test case in the bug demonstrates a pathological case with
> long-running static initializer: though it's allowed to access static
> fields from the thread performing the initialization, C2 can't prove
> that in general.
> While solving the general problem doesn't seem worth the effort
> (requires barriers on method entries), I propose to extend the logic
> to cover simple cases: when static initializer is the root of the
> compilation, all accesses to static fields of the corresponding class
> are allowed. It extends the coverage to all inlinees from OSR
> compilation of clinit.
What about the nmethod barriers for cuncurrent class/nmethod unloading?
Would they help in solving the general problem? Or is there another kind
of barrier you have in mind?
> Testing: hs-precheckin-comp, tier1-5
> Best regards,
> Vladimir Ivanov
More information about the hotspot-compiler-dev