RFR: 8263236: runtime/os/TestTracePageSizes.java fails on old kernels [v4]

Stefan Johansson sjohanss at openjdk.java.net
Thu May 6 12:15:54 UTC 2021


On Thu, 6 May 2021 10:46:15 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> See the bug report for details. On some kernels, the madvise hint is not reflected in `/proc/smaps`. Instead, we can use a secondary evidence and read `AnonHugePages`.
>> 
>> Additional testing:
>>  - [x] Test with kernel 5.4.0 (still passes)
>>  - [x] Test with kernel 4.9.0 (used to fail, now passes)
>
> Aleksey Shipilev has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - No tabs
>  - Just ignore on older kernels

Just realized one thing... you might be able to solve it with just adding to the `@requires` line as well, something like:
`@requires os.family == "linux" & os.simpleVersion >= 5` 
But I'm not sure if `>=` is allowed for `simpleVersion` and I'm not at all sure how `simpleVersion`is made available. Maybe it is a Mac thing, the only tests using it only matters for Mac. Maybe `os.versionMajor` is available to use. If you like this approach maybe you can try and see if it works.

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

PR: https://git.openjdk.java.net/jdk/pull/3415


More information about the hotspot-runtime-dev mailing list