hotspot/src/share/vm/runtime/thread.cpp
changeset 15492 7d3684b41115
parent 15221 83925f427779
child 15606 8cd2bedf376f
child 15497 cba24d845969
equal deleted inserted replaced
15489:0f2bd608c4f2 15492:7d3684b41115
  1498   if (is_attaching_via_jni) {
  1498   if (is_attaching_via_jni) {
  1499     _jni_attach_state = _attaching_via_jni;
  1499     _jni_attach_state = _attaching_via_jni;
  1500   } else {
  1500   } else {
  1501     _jni_attach_state = _not_attaching_via_jni;
  1501     _jni_attach_state = _not_attaching_via_jni;
  1502   }
  1502   }
  1503   assert(_deferred_card_mark.is_empty(), "Default MemRegion ctor");
  1503   assert(deferred_card_mark().is_empty(), "Default MemRegion ctor");
  1504   _safepoint_visible = false;
  1504   _safepoint_visible = false;
  1505 }
  1505 }
  1506 
  1506 
  1507 bool JavaThread::reguard_stack(address cur_sp) {
  1507 bool JavaThread::reguard_stack(address cur_sp) {
  1508   if (_stack_guard_state != stack_guard_yellow_disabled) {
  1508   if (_stack_guard_state != stack_guard_yellow_disabled) {
  1894 
  1894 
  1895   if (JvmtiEnv::environments_might_exist()) {
  1895   if (JvmtiEnv::environments_might_exist()) {
  1896     JvmtiExport::cleanup_thread(this);
  1896     JvmtiExport::cleanup_thread(this);
  1897   }
  1897   }
  1898 
  1898 
       
  1899   // We must flush any deferred card marks before removing a thread from
       
  1900   // the list of active threads.
       
  1901   Universe::heap()->flush_deferred_store_barrier(this);
       
  1902   assert(deferred_card_mark().is_empty(), "Should have been flushed");
       
  1903 
  1899 #ifndef SERIALGC
  1904 #ifndef SERIALGC
  1900   // We must flush G1-related buffers before removing a thread from
  1905   // We must flush the G1-related buffers before removing a thread
  1901   // the list of active threads.
  1906   // from the list of active threads. We must do this after any deferred
       
  1907   // card marks have been flushed (above) so that any entries that are
       
  1908   // added to the thread's dirty card queue as a result are not lost.
  1902   if (UseG1GC) {
  1909   if (UseG1GC) {
  1903     flush_barrier_queues();
  1910     flush_barrier_queues();
  1904   }
  1911   }
  1905 #endif
  1912 #endif
  1906 
  1913