8197993: Remove last use of JavaThread::flush_barrier_queues()
authorpliden
Fri, 16 Feb 2018 12:18:09 +0100
changeset 49006 c6d1c4ad90f4
parent 49005 cc2b457f2589
child 49007 82d9d5744e5f
8197993: Remove last use of JavaThread::flush_barrier_queues() Reviewed-by: tschatzl, eosterlund
src/hotspot/share/runtime/thread.cpp
src/hotspot/share/runtime/thread.hpp
--- a/src/hotspot/share/runtime/thread.cpp	Fri Feb 16 12:18:09 2018 +0100
+++ b/src/hotspot/share/runtime/thread.cpp	Fri Feb 16 12:18:09 2018 +0100
@@ -2027,12 +2027,6 @@
 }
 
 #if INCLUDE_ALL_GCS
-// Flush G1-related queues.
-void JavaThread::flush_barrier_queues() {
-  satb_mark_queue().flush();
-  dirty_card_queue().flush();
-}
-
 void JavaThread::initialize_queues() {
   assert(!SafepointSynchronize::is_at_safepoint(),
          "we should not be at a safepoint");
@@ -2076,11 +2070,7 @@
     tlab().make_parsable(true);  // retire TLAB, if any
   }
 
-#if INCLUDE_ALL_GCS
-  if (UseG1GC) {
-    flush_barrier_queues();
-  }
-#endif // INCLUDE_ALL_GCS
+  BarrierSet::barrier_set()->flush_deferred_barriers(this);
 
   Threads::remove(this);
   this->smr_delete();
--- a/src/hotspot/share/runtime/thread.hpp	Fri Feb 16 12:18:09 2018 +0100
+++ b/src/hotspot/share/runtime/thread.hpp	Fri Feb 16 12:18:09 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -1075,8 +1075,6 @@
   DirtyCardQueue _dirty_card_queue;      // Thread-local log for dirty cards.
   // Set of all such queues.
   static DirtyCardQueueSet _dirty_card_queue_set;
-
-  void flush_barrier_queues();
 #endif // INCLUDE_ALL_GCS
 
   friend class VMThread;