RFR: 8261029: Code heap page sizes not traced correctly using os::trace_page_sizes
Stefan Johansson
sjohanss at openjdk.java.net
Thu Feb 11 13:13:37 UTC 2021
On Wed, 10 Feb 2021 22:57:28 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> When adding a code heap the page size used with the underlying mapping is traced using `os::trace_page_sizes`. The old code tried to estimate the page-size based on the size, but the mapping has already been done so it is better to check the passed in `ReservedSpace`. Today we don't record the page size in the ReservedSpace, but we have a helper to do a good estimate: `ReservedSpace::actual_reserved_page_size()`. The proposal is to use this function.
>>
>> When changing this I also realized that the traced min-size used un-aligned value while the actual `initialize`-call correctly uses the aligned size. Changed so that we also use the aligned size for tracing.
>>
>> I'm currently doing some more work in this area and while I haven't added a specific test for this issue I have created a test I plan to integrate separately when a few more needed changes have gone in. The test is Linux-only and validates the output from `os::trace_page_sizes` against the information in `/proc/self/smaps`.
>
> Good.
Thanks for the reviews, @vnkozlov, @tstuefe and @TobiHartmann
-------------
PR: https://git.openjdk.java.net/jdk/pull/2481
More information about the hotspot-compiler-dev
mailing list