RFR(s): 8171449" [aarch64] store_klass needs to use store release
thomas.schatzl at oracle.com
Tue Dec 20 09:14:22 UTC 2016
On Tue, 2016-12-20 at 08:43 +0000, Andrew Haley wrote:
> On 19/12/16 21:22, White, Derek wrote:
> > As the "FIXME" noted, aarch64 really does need to use a store
> > release in the "store_klass" macro, at least when a concurrent GC
> > is in effect.
> > BUG: https://bugs.openjdk.java.net/browse/JDK-8171449
> > Webrev: http://cr.openjdk.java.net/~drwhite/8171449/webrev.01/index
> > .html
> > BTW, PPC is likely to need a similar fix...
> > Thanks,
> > - Derek
> I'm a bit baffled by the reasoning behind all of this. If a Java
> thread isn't finished initializing an array then it's not reachable
> from another thread.
you are probably missing a "Java" between "another" and "thread" here
to make this statement correct ;)
The concurrent garbage collectors may scan areas of the heap that is
currently being allocated into.
Setting the object's klass field means to them that the members of the
particular object have been completely initialized and can be parsed by
the GC thread(s).
I did not look at the patch, just answering this question.
More information about the hotspot-runtime-dev