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
--- 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;