8201321: NMT: Unnecessary re-recording thread stack and size when attaching listener to JavaThread
authorzgu
Tue, 10 Apr 2018 08:15:40 -0400
changeset 49737 01960eec4570
parent 49736 3d4c2d0b337f
child 49738 a7bc87a63dd8
8201321: NMT: Unnecessary re-recording thread stack and size when attaching listener to JavaThread Summary: Replaced recoding thread stack and size with assertion Reviewed-by: dholmes, coleenp
src/hotspot/share/services/attachListener.cpp
--- a/src/hotspot/share/services/attachListener.cpp	Tue Apr 10 08:13:06 2018 -0400
+++ b/src/hotspot/share/services/attachListener.cpp	Tue Apr 10 08:15:40 2018 -0400
@@ -334,7 +334,9 @@
 static void attach_listener_thread_entry(JavaThread* thread, TRAPS) {
   os::set_priority(thread, NearMaxPriority);
 
-  thread->record_stack_base_and_size();
+  assert(thread == Thread::current(), "Must be");
+  assert(thread->stack_base() != NULL && thread->stack_size() > 0,
+         "Should already be setup");
 
   if (AttachListener::pd_init() != 0) {
     return;