RFR (S): 8182703: Correct G1 barrier queue lock orderings

Thomas Schatzl thomas.schatzl at oracle.com
Tue Jul 4 18:14:04 UTC 2017


On Tue, 2017-07-04 at 19:43 +0200, Thomas Schatzl wrote:
> Hi,
> On Mon, 2017-06-26 at 15:34 +0200, Erik Österlund wrote:
> > 
> > Hi,
> > 
> > Webrev: http://cr.openjdk.java.net/~eosterlund/8182703/webrev.02/
> > Bug: https://bugs.openjdk.java.net/browse/JDK-8182703
> > 
>   looks good apart from the comment at Monitor::event_types. It now
> contradicts itself from one sentence to the next ("special must be
> lowest" and then "oh no, after all access must be lowest"). Please
> try to find some better wording here :)

Some more comments about the comment added in this change:

  96   // The rank access is reserved for locks that may be required to
  97   // memory accesses that require special GC barriers, such as
SATB barriers.
  98   // Since memory accesses should be able to be performed pretty
much anywhere
  99   // in the code, that wannts being more special than the
"special" rank.

- s/wannts/requires in that comment.

- I do not think the access lock rank is used for special GC barriers,
at least the "SATB barrier" is a bad example. The SATB barrier is
commonly the pre-write barrier in generated code, and the locks do not
have a lot in common with write barriers.

Maybe the text wanted to give an example for why locks of this rank
could be called at any time - because the lock might be taken as part
of some SATB barrier code?


More information about the hotspot-gc-dev mailing list