RFR: 8238979: Improve G1DirtyCardQueueSet handling of previously paused buffers

Stefan Johansson stefan.johansson at oracle.com
Wed Feb 26 09:07:08 UTC 2020


Hi Kim,

> 14 feb. 2020 kl. 02:46 skrev Kim Barrett <kim.barrett at oracle.com>:
> 
> Please review this simplification of the handling of previously paused
> buffers by G1DirtyCardQueueSet.  This change moves the call to
> enqueue_previous_paused_buffers() into record_paused_buffer().  This
> ensures any paused buffers from a previous safepoint have been flushed
> out before recording a buffer for the next safepoint.
> 
> This move eliminates the former precondition that the enqueue had to
> have been performed before recording.
> 
> This move also permits the enqueue_previous_paused_buffers in
> get_completed_buffer() to be moved to a point where it will be called
> much more rarely, slightly improving the normal performance of
> get_dirtied_buffer.  The old location of the call was in support of
> the call order invariant needed by record_paused_buffer().
> 
> As a consequence of the changed enqueue locations, the fast path check
> in enqueue_previous_paused_buffers() will now only rarely succeed, and
> is no longer worth the (very small) performance cost and (much more
> importantly) the largish block comment arguing its correctness.  So
> that fast path is removed.  And since the raison d'etre for
> PausedBuffers::is_empty() was to support that fast path, that function
> is also removed.
> 
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8238979
> 
> Webrev:
> https://cr.openjdk.java.net/~kbarrett/8238979/open.00/
Looks good,
StefanJ

> 
> Testing:
> mach5 tier1-5 in conjunction with other in-development changes.
> Local (linux-x64) hotspot:tier1 for this change in isolation.
> 




More information about the hotspot-gc-dev mailing list