changeset 49662:01960eec4570

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
author zgu
date Tue, 10 Apr 2018 08:15:40 -0400
parents 3d4c2d0b337f
children a7bc87a63dd8
files src/hotspot/share/services/attachListener.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;