RFR(s): [aix]: 8182984: [aix] Make stack traces independent on successful vm initialization

Thomas Stüfe thomas.stuefe at gmail.com
Wed Jun 28 13:42:03 UTC 2017


Thank you Volker!

I agree with yours (and Martins) suggestions - will remove the superfluous
struct member.

Christoph also had a suggestion offlist to add error handling in
porting_aix.cpp for the case that we cannot retrieve the callstack. I will
add that too.

Kind Regards, Thomas

On Wed, Jun 28, 2017 at 2:34 PM, Volker Simonis <volker.simonis at gmail.com>
wrote:

> Hi Thomas,
>
> the change looks good. Following just a little nit-picking:
>
> os_aix.cpp
> - you can also remove the comment "133 // Query dimensions of the
> stack of the calling thread."
>
> porting_aix.cpp
> - the comment "base, high" should be on the line:
>  856   //    |         ---------------------   __pi_stackend
> instead of:
>  852   // high addr    ---------------------
>
> - why do we need the field 'address high' which is merely an alias for
> 'base' ? I'd remove it.
>
> There's no need for a new webrev if you agree with my suggestions :)
>
> Thank you and best regards,
> Volker
>
>
> On Wed, Jun 28, 2017 at 12:22 PM, Thomas Stüfe <thomas.stuefe at gmail.com>
> wrote:
> > 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/bf58d384/attachment.html>


More information about the ppc-aix-port-dev mailing list