8175221: Cleanup DirtyCardQueueSet::concatenate_log
authorkbarrett
Sat, 04 Mar 2017 15:56:22 -0500
changeset 46305 bff6d23aa1e3
parent 46304 8d4d88f90669
child 46306 26cf11456712
8175221: Cleanup DirtyCardQueueSet::concatenate_log Summary: concatenate_log calls flush, flush no longer checks "permanent" Reviewed-by: tschatzl, shade
hotspot/src/share/vm/gc/g1/dirtyCardQueue.cpp
hotspot/src/share/vm/gc/g1/dirtyCardQueue.hpp
hotspot/src/share/vm/gc/g1/ptrQueue.cpp
hotspot/src/share/vm/gc/g1/ptrQueue.hpp
--- a/hotspot/src/share/vm/gc/g1/dirtyCardQueue.cpp	Fri Mar 03 12:02:35 2017 +0100
+++ b/hotspot/src/share/vm/gc/g1/dirtyCardQueue.cpp	Sat Mar 04 15:56:22 2017 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -301,9 +301,7 @@
 
 void DirtyCardQueueSet::concatenate_log(DirtyCardQueue& dcq) {
   if (!dcq.is_empty()) {
-    enqueue_complete_buffer(
-      BufferNode::make_node_from_buffer(dcq.get_buf(), dcq.get_index()));
-    dcq.reinitialize();
+    dcq.flush();
   }
 }
 
--- a/hotspot/src/share/vm/gc/g1/dirtyCardQueue.hpp	Fri Mar 03 12:02:35 2017 +0100
+++ b/hotspot/src/share/vm/gc/g1/dirtyCardQueue.hpp	Sat Mar 04 15:56:22 2017 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,10 +52,6 @@
   // Process queue entries and release resources.
   void flush() { flush_impl(); }
 
-  void **get_buf() { return _buf;}
-  size_t get_index() { return _index;}
-  void reinitialize() { _buf = 0; _sz = 0; _index = 0;}
-
   // Compiler support.
   static ByteSize byte_offset_of_index() {
     return PtrQueue::byte_offset_of_index<DirtyCardQueue>();
--- a/hotspot/src/share/vm/gc/g1/ptrQueue.cpp	Fri Mar 03 12:02:35 2017 +0100
+++ b/hotspot/src/share/vm/gc/g1/ptrQueue.cpp	Sat Mar 04 15:56:22 2017 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,7 +42,7 @@
 }
 
 void PtrQueue::flush_impl() {
-  if (!_permanent && _buf != NULL) {
+  if (_buf != NULL) {
     BufferNode* node = BufferNode::make_node_from_buffer(_buf, _index);
     if (is_empty()) {
       // No work to do.
--- a/hotspot/src/share/vm/gc/g1/ptrQueue.hpp	Fri Mar 03 12:02:35 2017 +0100
+++ b/hotspot/src/share/vm/gc/g1/ptrQueue.hpp	Sat Mar 04 15:56:22 2017 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -69,7 +69,7 @@
   PtrQueueSet* qset() { return _qset; }
   bool is_permanent() const { return _permanent; }
 
-  // Process queue entries and release resources, if not permanent.
+  // Process queue entries and release resources.
   void flush_impl();
 
   // Initialize this queue to contain a null buffer, and be part of the