src/hotspot/share/runtime/thread.cpp
changeset 49006 c6d1c4ad90f4
parent 48961 120b61d50f85
child 49007 82d9d5744e5f
equal deleted inserted replaced
49005:cc2b457f2589 49006:c6d1c4ad90f4
  2025                                  _timer_exit_phase4.milliseconds());
  2025                                  _timer_exit_phase4.milliseconds());
  2026   }
  2026   }
  2027 }
  2027 }
  2028 
  2028 
  2029 #if INCLUDE_ALL_GCS
  2029 #if INCLUDE_ALL_GCS
  2030 // Flush G1-related queues.
       
  2031 void JavaThread::flush_barrier_queues() {
       
  2032   satb_mark_queue().flush();
       
  2033   dirty_card_queue().flush();
       
  2034 }
       
  2035 
       
  2036 void JavaThread::initialize_queues() {
  2030 void JavaThread::initialize_queues() {
  2037   assert(!SafepointSynchronize::is_at_safepoint(),
  2031   assert(!SafepointSynchronize::is_at_safepoint(),
  2038          "we should not be at a safepoint");
  2032          "we should not be at a safepoint");
  2039 
  2033 
  2040   SATBMarkQueue& satb_queue = satb_mark_queue();
  2034   SATBMarkQueue& satb_queue = satb_mark_queue();
  2074 
  2068 
  2075   if (UseTLAB) {
  2069   if (UseTLAB) {
  2076     tlab().make_parsable(true);  // retire TLAB, if any
  2070     tlab().make_parsable(true);  // retire TLAB, if any
  2077   }
  2071   }
  2078 
  2072 
  2079 #if INCLUDE_ALL_GCS
  2073   BarrierSet::barrier_set()->flush_deferred_barriers(this);
  2080   if (UseG1GC) {
       
  2081     flush_barrier_queues();
       
  2082   }
       
  2083 #endif // INCLUDE_ALL_GCS
       
  2084 
  2074 
  2085   Threads::remove(this);
  2075   Threads::remove(this);
  2086   this->smr_delete();
  2076   this->smr_delete();
  2087 }
  2077 }
  2088 
  2078