8182864: [aix] os::print_native_callstack should not assert for primordial threadness
authorstuefe
Tue, 27 Jun 2017 07:52:50 +0200
changeset 46567 30efdd5f0dc9
parent 46566 231c681fa946
child 46569 33bfb73333f9
child 46591 3f3105af599e
8182864: [aix] os::print_native_callstack should not assert for primordial threadness Reviewed-by: clanger, mdoerr
hotspot/src/os/aix/vm/os_aix.cpp
hotspot/src/os/aix/vm/porting_aix.cpp
--- a/hotspot/src/os/aix/vm/os_aix.cpp	Mon Jun 26 16:10:31 2017 -0700
+++ b/hotspot/src/os/aix/vm/os_aix.cpp	Tue Jun 27 07:52:50 2017 +0200
@@ -4299,9 +4299,6 @@
 
 // Function to query the current stack size using pthread_getthrds_np.
 static bool query_stack_dimensions(address* p_stack_base, size_t* p_stack_size) {
-  // This only works when invoked on a pthread. As we agreed not to use
-  // primordial threads anyway, I assert here.
-  guarantee(!os::Aix::is_primordial_thread(), "not allowed on the primordial thread");
 
   // Information about this api can be found (a) in the pthread.h header and
   // (b) in http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.basetechref/doc/basetrf1/pthread_getthrds_np.htm
@@ -4323,7 +4320,6 @@
                                      sizeof(pinfo), dummy, &dummy_size);
 
   if (rc != 0) {
-    assert0(false);
     trcVerbose("pthread_getthrds_np failed (%d)", rc);
     return false;
   }
--- a/hotspot/src/os/aix/vm/porting_aix.cpp	Mon Jun 26 16:10:31 2017 -0700
+++ b/hotspot/src/os/aix/vm/porting_aix.cpp	Tue Jun 27 07:52:50 2017 +0200
@@ -640,6 +640,7 @@
   // fallback: use the current context
   ucontext_t local_context;
   if (!uc) {
+    st->print_cr("No context given, using current context.");
     if (getcontext(&local_context) == 0) {
       uc = &local_context;
     } else {