RFR: 8267155: runtime/os/TestTracePageSizes times out [v5]
Aleksey Shipilev
shade at openjdk.java.net
Wed May 19 16:04:45 UTC 2021
On Wed, 19 May 2021 15:28:16 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> This Linux-specific test parses `/proc/self/smaps` using a dotall regular expression. If part of the expression don't match it explodes in complexity, leading to timeouts.
>>
>> In our case, `VmFlags` tag was missing from smaps, which was introduced with kernel 3.8. I am actually not able to determine how slow they were; on one machine they ran for two hours before getting killed.
>>
>> I tried to fiddle with the regular expression and gave up, instead opting to rewrite the parser to get a simple one-pass scan. This is way faster than before - on our old-kernel machines the tests complete in 2 minutes. On new kernels the test is a bit faster too.
>>
>> In addition to rewriting the parser, I added code which copies the smaps file into the test directory before parsing it. I do this to minimize problems should the underlying proc fs content change while parsing, and to have a way to retain the parsed smaps files.
>>
>> I also added a way to feed an external smaps file into the test. Of course the test would fail, but it was a way to test the parser.
>>
>> Unfortunately, this does not make the test succeed. The timeouts are gone, but we have still have no way to know if TPHs are enabled or not. That is a separate issue though.
>>
>> Thanks, Thomas
>
> Thomas Stuefe has updated the pull request incrementally with four additional commits since the last revision:
>
> - fixes
> - made kernel 3.8 mandatory
> - Merge branch 'JDK-8267155-runtime-os-TestTracePageSize-times-out' of github.com:tstuefe/jdk into JDK-8267155-runtime-os-TestTracePageSize-times-out
> - wip
This looks fine to me, modulo a few nits.
test/hotspot/jtreg/runtime/os/TestTracePageSizes.java line 121:
> 119: debug("kernelVersion " + Long.toHexString(kernelVersion));
> 120: return kernelVersion;
> 121: }
Let's not do any bit magic? Just inline this to the only use and do the proper branchy "if"?
test/hotspot/jtreg/runtime/os/TestTracePageSizes.java line 243:
> 241: this.end = Long.parseUnsignedLong(end, 16);
> 242: this.pageSize = Long.parseLong(pageSize);
> 243:
Restore this newline?
-------------
Changes requested by shade (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/4064
More information about the hotspot-runtime-dev
mailing list