RFR: 8300659: Refactor TestMemoryAwareness to use WhiteBox api for host values [v2]

Matthias Baesken mbaesken at openjdk.org
Tue Jan 24 08:51:06 UTC 2023


On Thu, 19 Jan 2023 17:24:57 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:

>> Please review this refactoring of a container test. It now uses WhiteBox to retrieve the host values it asserts for. In terms of functionality this is basically a no-op except for the now more precise assertion on systems with swap accounting disabled at the kernel level.
>> 
>> *Testing*
>> - [x] Container tests on Linux x86_64 cgv1 and cgv2
>> - [x] Container tests on Linux x86_64 cgv1 and cgv2 on systems with swapaccount=0
>> - [x] GHA in progress 
>> 
>> Thoughts?
>
> Severin Gehwolf has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains one additional commit since the last revision:
> 
>   8300659: Refactor TestMemoryAwareness to use WhiteBox api for host values

Hi Severin, what do you think about renaming the methods  to WB_HostPhysicalMemory / WB_HostPhysicalSwap  to make it even more clear that the host values are meant ? On Linux we have values
`_physical_memory = (julong)sysconf(_SC_PHYS_PAGES) * (julong)sysconf(_SC_PAGESIZE);`
and
`julong os::physical_memory()`   from os_linux.cpp (including OSContainer::memory_limit_in_bytes())  so these could be 2 different values .

And please adjust the COPYRIGHT years to 2023.

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

PR: https://git.openjdk.org/jdk/pull/12097


More information about the serviceability-dev mailing list