[aarch64-port-dev ] RFR(trivial): 8163363: AArch64: Stack size in tools/launcher/Settings.java needs to be adjusted

Patrick Zhang OS patrick at os.amperecomputing.com
Thu Apr 11 11:13:00 UTC 2019


Hi Leonid and Andrew,
Could you please help review this, thanks.

Regards
Patrick

-----Original Message-----
From: aarch64-port-dev <aarch64-port-dev-bounces at openjdk.java.net> On Behalf Of Patrick Zhang OS
Sent: Tuesday, April 9, 2019 7:20 PM
To: aarch64-port-dev at openjdk.java.net
Subject: [aarch64-port-dev ] RFR(trivial): 8163363: AArch64: Stack size in tools/launcher/Settings.java needs to be adjusted

Hi

This is a simple patch to make jtreg tools/launcher/Settings.java pass with some of aarch64 platforms.

Detailed explanation can be found in the Jira ticket, https://bugs.openjdk.java.net/browse/JDK-8163363?focusedCommentId=14256491&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14256491. Here is a summary:
The issue is to find out the max value of min stack sizes.
See os::Posix::set_minimum_stack_sizes() in jdk/src/hotspot/os/posix/os_posix.cpp.
As the calculated sizes are required to be aligned up to vm_page_size(), suppose it is 64K (getconf PAGE_SIZE). In os::Posix::set_minimum_stack_sizes() , stack_guard_zone_size() covers red, yellow, and reserved (JEP#270) zones, so it is 64x3=192K; while stack_shadow_zone_size() by default is (20 DEBUG_ONLY(+5)), i.e., 128K=align_up(25 * 4K, 64K), so _java_thread_min_stack_allowed=align_up(72+192+128, 64)=448K.

JBS: https://bugs.openjdk.java.net/browse/JDK-8163363
Webrev: http://cr.openjdk.java.net/~qpzhang/8163363/webrev.01/

Regards
Patrick



More information about the aarch64-port-dev mailing list