Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8240722: [BACKOUT] G1DirtyCardQueue destructor has useless flush
Backout JDK-8240133

Reviewed-by: sjohanss
  • Loading branch information
Kim Barrett committed Mar 9, 2020
1 parent ba2e417 commit 1c1fb44ac168f4bad71339aca5f7a1ec0cbf3abc
Showing with 8 additions and 0 deletions.
  1. +4 −0 src/hotspot/share/gc/g1/g1DirtyCardQueue.cpp
  2. +4 −0 src/hotspot/share/gc/g1/g1DirtyCardQueue.hpp
@@ -50,6 +50,10 @@ G1DirtyCardQueue::G1DirtyCardQueue(G1DirtyCardQueueSet* qset) :
PtrQueue(qset, true /* active */)
{ }

G1DirtyCardQueue::~G1DirtyCardQueue() {
flush();
}

void G1DirtyCardQueue::handle_completed_buffer() {
assert(_buf != NULL, "precondition");
BufferNode* node = BufferNode::make_node_from_buffer(_buf, index());
@@ -44,6 +44,10 @@ class G1DirtyCardQueue: public PtrQueue {
public:
G1DirtyCardQueue(G1DirtyCardQueueSet* qset);

// Flush before destroying; queue may be used to capture pending work while
// doing something else, with auto-flush on completion.
~G1DirtyCardQueue();

// Process queue entries and release resources.
void flush() { flush_impl(); }

0 comments on commit 1c1fb44

Please sign in to comment.