RFR: 8333769: Pretouching tests dont test pretouching [v2]
Sonia Zaldana Calles
szaldana at openjdk.org
Mon Jun 17 15:38:30 UTC 2024
> Hi all,
>
> This PR addresses [8333769](https://bugs.openjdk.org/browse/JDK-8333769).
>
> We already have a test for parallel GC that makes sure pretouching behaviour is correct ([test/hotspot/jtreg/gc/parallel/TestAlwaysPreTouchBehavior.java](https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/gc/parallel/TestAlwaysPreTouchBehavior.java)).
>
> Unfortunately this test is limited to linux because of the scanning of `/proc/pid/status`. With this patch I propose two changes:
>
> - Adding a function to the os namespace `os::rss` and exposing this API via WhiteBox. This in turn allows us to generalize the above test to be used across all platforms.
> - Running the modified test with all collectors.
>
> Additionally, I considered removing other pre-existing pretouch tests (for example, this [z test](https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/gc/z/TestAlwaysPreTouch.java)), as this new test is a bit more thorough. However, I noticed that some of these tests run alongside other configurables such as varying numbers of parallel GC threads, varying heap sizes, etc. Therefore, there might not be any harm in running these tests as well.
>
> Looking forward to your comments,
> Sonia
Sonia Zaldana Calles has updated the pull request incrementally with one additional commit since the last revision:
Changes based on feedback and also adding test for serial collector
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/19699/files
- new: https://git.openjdk.org/jdk/pull/19699/files/c1dacf72..756899a7
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=19699&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=19699&range=00-01
Stats: 43 lines in 6 files changed: 19 ins; 1 del; 23 mod
Patch: https://git.openjdk.org/jdk/pull/19699.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19699/head:pull/19699
PR: https://git.openjdk.org/jdk/pull/19699
More information about the hotspot-gc-dev
mailing list