RFR(s): [aix]: 8182984: [aix] Make stack traces independent on successful vm initialization
Thomas Stüfe
thomas.stuefe at gmail.com
Wed Jun 28 10:22:02 UTC 2017
Hi all,
please review, at your convenience, the following AIX-only fix:
Issue: https://bugs.openjdk.java.net/browse/JDK-8182984
Webrev: http://cr.openjdk.java.net/~stuefe/webrevs/8182984-aix-
better-stacktraces/webrev.00/webrev/
In short, it improves the chances of getting better callstacks if the VM
crashes or asserts before os::init() ran or if os::init() ran into an error.
Details:
callstack printing is implemented in our porting layer
(porting_aix.hpp/cpp), in "AixNativeCallstack::print_
callstack_for_context()".
This change makes this independent from VM infrastructure (it should be,
because the porting layer should be below the hotspot and should not have
dependencies into it).
For one, it is not necessary to use Thread::current() to get the current
threads stack bounds, because that requires pthread TLS being initialized
successfully and a current Thread* to exist. For the purpose of stack trace
printing, we can just call pthread_getthrds_np().
Then, we use os::vm_page_size() to align the lower stack boundary to the
stack page size (to place our guard pages later). This is a hotspot
implementation detail and does not have to be done in the porting layer,
but should be moved upward to os::current_stack_size().
Thank you for reviewing,
Kind Regards, Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/ppc-aix-port-dev/attachments/20170628/6fce444d/attachment.html>
More information about the ppc-aix-port-dev
mailing list