RFR: JDK-8305416: runtime/Thread/TestAlwaysPreTouchStacks.java failed with "Did not find expected NMT output" [v2]

Thomas Stuefe stuefe at openjdk.org
Wed Apr 5 07:06:08 UTC 2023


On Wed, 5 Apr 2023 04:47:45 GMT, David Holmes <dholmes at openjdk.org> wrote:

>How were these boundaries determined? 

There is a vagueness about reserved total stack size of course - it contains other thread's stack sizes too, and any overhead that the VM may add atop of user-specified thread stack sizes, mainly guard pages.

Min is the logical lower end and the actual number should be greater.
Max is chosen very generously to be much larger. Maybe too large, but I did not want to play whack-the-mole for false positives on platforms I have not tested manually (e.g. larger paged ones), while still excluding obviously insane cases.

On the platforms I tested on variance was not large at all; my 128MB reserved stack size for the test threads gives me:

linux x86: 133MB
linux aarch64 (4k pages): 154MB
linux x64: 144MB

(The difference between aarch64 and x64 is interesting but I did not dive deeper into that; I assume number of hotspot threads may differ for threads started based on number of cores, but my x64 machine is way beefier than my aarch64-box so the ratio should be reversed)..

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13295#discussion_r1158096390


More information about the hotspot-runtime-dev mailing list