RFR: 8335167: Test runtime/Thread/TestAlwaysPreTouchStacks.java failed with Expected a higher ratio between stack committed and reserved [v5]
Afshin Zafari
azafari at openjdk.org
Mon Sep 23 08:17:13 UTC 2024
On Thu, 19 Sep 2024 15:56:18 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
>>
>> two new expectations added
>
> test/hotspot/jtreg/runtime/Thread/TestAlwaysPreTouchStacks.java line 179:
>
>> 177: if (ratio_with < ratio_without) {
>> 178: throw new RuntimeException("Expected a higher ratio between stack committed and reserved.");
>> 179: }
>
> I think you can simplify. You improved the test, so we don't really need to look at "reserved" save for some basic sanity tests. The reserved-committed ratio is of no interest save to ensure that committed <= reserved (and we do this in other NMT tests).
>
> For both runs, "reserved" should be near identical: It is the combined stack size for all threads running at VM stop. All test threads should still be alive, so the only thing that can vary randomly is whether or not other threads managed to finish before the NMT report is printed. So, I think, you can simplify to just test that "Reserved", in both runs, is >= combined size of test thread stacks (128MB).
If we don't save the Reserved and just look at it for each run independently, we get back to the original test which has problems in macos-aarch64 environments. We decided/agreed to have two tests and save the amounts and then compare them to check if pretouch was done or not.
Maybe I misunderstood you.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20531#discussion_r1770945077
More information about the hotspot-runtime-dev
mailing list