< prev index next >

src/hotspot/share/runtime/thread.cpp

Print this page
rev 49264 : [mq]: event-only

@@ -234,10 +234,11 @@
   set_handle_area(new (mtThread) HandleArea(NULL));
   set_metadata_handles(new (ResourceObj::C_HEAP, mtClass) GrowableArray<Metadata*>(30, true));
   set_active_handles(NULL);
   set_free_handle_block(NULL);
   set_last_handle_mark(NULL);
+  _heap_sampler.set_thread(this);
 
   // This initial value ==> never claimed.
   _oops_do_parity = 0;
   _threads_hazard_ptr = NULL;
   _nested_threads_hazard_ptr = NULL;

@@ -2046,10 +2047,11 @@
 
   if (UseTLAB) {
     tlab().make_parsable(true);  // retire TLAB, if any
   }
 
+
   BarrierSet::barrier_set()->on_thread_detach(this);
 
   Threads::remove(this);
   this->smr_delete();
 }

@@ -4310,11 +4312,10 @@
 void Threads::add(JavaThread* p, bool force_daemon) {
   // The threads lock must be owned at this point
   assert_locked_or_safepoint(Threads_lock);
 
   BarrierSet::barrier_set()->on_thread_attach(p);
-
   p->set_next(_thread_list);
   _thread_list = p;
 
   // Once a JavaThread is added to the Threads list, smr_delete() has
   // to be used to delete it. Otherwise we can just delete it directly.
< prev index next >