10 RFR: 8175221: Cleanup DirtyCardQueueSet::concatenate_log

Thomas Schatzl thomas.schatzl at oracle.com
Tue Feb 21 12:01:45 UTC 2017

Hi Kim,

On Sun, 2017-02-19 at 16:38 -0500, Kim Barrett wrote:
> Please review this simplification of concatenate_log and removal of
> some thereby unused public functions from DirtyCardQueue.
> We change concatenate_log to call flush, rather than inlining more or
> less equivalent code.  The flush is conditional on the queue
> containing any data, as we prefer to leave an empty buffer in place
> in the queue when concatenating.
> We also changed flush to support this; flush was a nop when the queue
> is "permanent", which is not what we want for concatenate_log.  This
> behavior was because flush was called by the queue destructor, and
> performing a flush when destroying the shared queue for a set was
> problematic.  However, JDK-8048949 changed things so that only the
> DirtyCardQueue destructor called flush, and only if the queue is
> non-permanent.  So the permanent check in flush is no longer needed,
> and removing it makes it suitable for use by concatenate_log.
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8175221
> Webrev:
> http://cr.openjdk.java.net/~kbarrett/8175221/hotspot.00/

  looks good to me. Given your description, and some short look through
the callers of the code, is it useful to assert that flush is not
called on permanent ptrqueues?


More information about the hotspot-gc-dev mailing list