RFR(S): 8156992: [ppc] Implement template interpreter stack overflow checks as on x86/sparc.

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Thu May 19 06:01:25 UTC 2016


Hi Dean,

Hmm, the comment didn't really make sense before, because the field is meant
to be used in the first template Interpreter stack check, see also my explanation
in the bug: https://bugs.openjdk.java.net/browse/JDK-8156922
That's also where the MAX2 comes from:
http://hg.openjdk.java.net/jdk9/hs/hotspot/file/51d42ae63fe5/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp
line 548. The comment belongs at this place.
x86/sparc load stack_base and stack_size from thread and do some computation,
ppc only does a single load.  This is more efficient.

Also I'm not sure whether the banging can be replaced completely by
a compare, as it assures the pages are not only reserved, but really
mapped.  We had an issue quite some years before on windows, if
I remember correctly.

Best regards,
  Goetz.

From: dean.long at oracle.com [mailto:dean.long at oracle.com]
Sent: Thursday, May 19, 2016 2:15 AM
To: Lindenmaier, Goetz <goetz.lindenmaier at sap.com>; hotspot-runtime-dev at openjdk.java.net
Subject: Re: RFR(S): 8156992: [ppc] Implement template interpreter stack overflow checks as on x86/sparc.

By changing the value of the _stack_overflow_limit field, does the following x86/sparc comment
still make sense?

// TODO: rather than touching all pages, check against stack_overflow_limit and bang yellow page to
// generate exception

Also, I have to admit that I don't understand why we use different values for stack checks/bang in different places, especially the using MAX2 instead of +.  Can anyone explain this?  The + makes sense to me, but the MAX2 does not.

dl
On 5/18/16 3:02 AM, Lindenmaier, Goetz wrote:

Hi,







When porting the template interpreter, we implemented a different approach to



Stack overflow handling.  See also the detailed description in the Jira bug.







This change implements the stack overflow check as on x86/sparc.



It requires simple shared changes, but only to code only used on ppc.



The changes should not affect the other platforms.







Please review this change. I please need a sponsor.



http://cr.openjdk.java.net/~goetz/wr16/8156922-ppcStackFix/webrev.01/







Best regards,



  Goetz.





More information about the hotspot-runtime-dev mailing list