RFR: 8262188: Add test to verify trace page sizes logging on Linux [v2]

Thomas Schatzl tschatzl at openjdk.java.net
Mon Mar 1 10:49:59 UTC 2021


On Wed, 24 Feb 2021 13:38:04 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:

>> Please review this new test that checks the output from `-Xlog:pagesize` and compares it to what's really used according to `/proc/self/smaps`.
>> 
>> We already have a few tests that check the output from `-Xlog:pagesize`, the difference is that those tests expect some page size given the parameters used. This new test instead check if the values printed out are correct with regards to what is recorded in `/proc/self/maps`.
>> 
>> I wrote the test to see if all our logging was correct, and found those two issues that are now fixed:
>> [JDK-8261029: Code heap page sizes not traced correctly using os::trace_page_sizes](https://bugs.openjdk.java.net/browse/JDK-8261029)
>> [JDK-8261230: GC tracing of page sizes are wrong in a few places](https://bugs.openjdk.java.net/browse/JDK-8261230)
>> 
>> The test now passes and it will be a good way to prevent incorrect page size logging to be added going forward.
>> 
>> **Testing**
>> The new test has been run through mach5 without any problems and also manually on configurations with explicit large pages enabled.
>
> Stefan Johansson has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8262188: Thomas review
>   
>   Updated with an additional run with setting page size = 2m and moved the regexp-string to where it is used.

I think this is good. There are two typos in there, please fix before pushing.

test/hotspot/jtreg/runtime/os/TestTracePageSizes.java line 175:

> 173:         while (fileScanner.hasNextLine()) {
> 174:             String line = fileScanner.nextLine();
> 175:             if (line.matches(traceLinePatternString)){

Missing space before the brace

test/hotspot/jtreg/runtime/os/TestTracePageSizes.java line 241:

> 239:     public RangeWithPageSize(String start, String end, String pageSize, String vmFlags) {
> 240:         this.start = Long.parseUnsignedLong(start, 16);
> 241:         this.end = Long.parseUnsignedLong(end, 16);;

two ";" at the end

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

Marked as reviewed by tschatzl (Reviewer).

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


More information about the hotspot-runtime-dev mailing list