Code review request: 6810698: G1: _expanded flag on sparse RSets not cleared correctly (XXXS)

Igor Veresov Igor.Veresov at Sun.COM
Thu Feb 26 19:08:14 UTC 2009


Gee, Tony, you forgot to rip the bang aid? ;)

igor

On Thursday 26 February 2009 10:04:55 Tony Printezis wrote:
>  From the CR blurb:
>
> Each sparse RSet has two tables: cur and next. At the beginning, both
> tables are the same (i.e., the two references _cur and _next point to the
> same table). When a sparse table needs to be expanded during a GC, the flag
> _expanded on the table is set, a new table is created (pointed to by _next)
> and the RSet is added to the expanded list. After the collection (in fact,
> at the beginning of the next collection), we iterate over the expanded
> list, we get rid of the _cur tables, and set _cur to point to _next (so the
> _next table basically replaces the _cur table). Unfortunately, at that
> time, the _expanded flag is not reset. So, if the sparse table is expanded
> again, it is not added to the expanded list (that operation is conditional
> on !_expanded, so that the table is not added twice during the same GC). As
> a result, some of the sparse tables are left in an inconsistent state,
> which causes some entries not to be scanned correctly during a GC.
>
> http://cr.openjdk.java.net/~tonyp/6810698/webrev.00/
>
> (one line change!!!)
>
> Tony





More information about the hotspot-gc-dev mailing list