RFR: 8280761: UseCompressedOops should be set after limit_heap_by_allocatable_memory [v3]

Thomas Schatzl tschatzl at openjdk.java.net
Fri Apr 8 09:21:42 UTC 2022


On Fri, 8 Apr 2022 08:44:33 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> KIRIYAMA Takuya has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8280761 UseCompressedOops should be set after limit_heap_by_allocatable_memory
>
> test/hotspot/jtreg/gc/arguments/TestUseCompressedOopsFlagsWithUlimit.java line 86:
> 
>> 84:     // 1. Verify that UseCompressedOops Ergo follows ulimit -v setting.
>> 85:     // 2. Verify that UseCompressedOops forces compressed oops limit even
>> 86:     //    when ulimit -v are specified.
> 
> I understand the first bullet but not the second. Looking at the reproducers in the JBS ticket, `UseCompressedOops` should not be provided; it's read only.

This looks like an additional (unrelated) test to make sure it is overridden if necessary imho. It seems a bit forced though because there is no test that actually verifies that `UseCompressedOops` is `false` later.
I'm good with removing the test case.

> test/hotspot/jtreg/gc/arguments/TestUseCompressedOopsFlagsWithUlimit.java line 90:
> 
>> 88:     long oneG = 1L * 1024L * 1024L * 1024L;
>> 89: 
>> 90:     // Args: MaxRAM , MaxRAMPercentage, forcecoop, expect coop
> 
> I am not sure why `MaxRAMPercentage` is needed here.

I think this is that the initial value for `reasonable_max` is exactly `MaxRAM`; you are right that for this test it is not necessary to pass it explicitly, just always set it to 100 percent in the command line.

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

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



More information about the hotspot-gc-dev mailing list