10 RFR: 8175221: Cleanup DirtyCardQueueSet::concatenate_log
kim.barrett at oracle.com
Tue Feb 21 15:35:17 UTC 2017
> On Feb 21, 2017, at 7:01 AM, Thomas Schatzl <thomas.schatzl at oracle.com> wrote:
> 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.
> 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?
No. The new concatenate_log use of flush violates that.
More information about the hotspot-gc-dev