RFR: 8264540: WhiteBox.metaspaceReserveAlignment should return shared region alignment [v2]

Ioi Lam iklam at openjdk.java.net
Fri Apr 2 16:49:10 UTC 2021


On Thu, 1 Apr 2021 22:15:51 GMT, Yumin Qi <minqi at openjdk.org> wrote:

>> Hi, Please review
>>   After JDK-8236847, the shared region alignment (new as MetaspaceShared::core_region_alignment) is no longer default to os pagesize, it is a configurable value at build time instead. The WhiteBox api metaspaceReserveAlignment() should reflect the change. 
>> 
>> Tests:tier1,tier2,tier3,tier4
>
> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix minimal build failure

Changes requested by iklam (Reviewer).

test/hotspot/jtreg/runtime/cds/appcds/SharedRegionAlignmentTest.java line 75:

> 73:                                                  TestCommon.concat(dumpLP, logArg));
> 74:             out.shouldContain("Dumping shared data to file");
> 75:             boolean is_alignment_logged = out.getStdout().contains(regionAlignmentString + regionAlignment);

Is `is_alignment_logged` still needed? Now both dump time and run time should contain the `regionAlignmentString + regionAlignment` string. Also, I think it's better to use a local variable like:

String expectedAlignment = regionAlignmentString + regionAlignment;

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

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


More information about the hotspot-dev mailing list