RFR: 8280761: UseCompressedOops should be set after limit_heap_by_allocatable_memory [v2]
    Albert Mingkun Yang 
    ayang at openjdk.java.net
       
    Thu Apr  7 14:10:42 UTC 2022
    
    
  
On Thu, 7 Apr 2022 06:58:32 GMT, KIRIYAMA Takuya <duke at openjdk.java.net> wrote:
>> I fixed to set UseCompressedOops flag after limit_heap_by_allocatable_memory(). 
>> So when ulimit -v is called and -XX:MaxRAM is set, UseCompressedOops does not become false. 
>> And all hotspot tier1 test are passed.
>> Would you please review this fix?
>
> 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
The hotspot change looks good to me, but there's sth unclear to me in the test.
test/hotspot/jtreg/gc/arguments/TestUseCompressedOopsFlagsWithUlimit.java line 62:
> 60: 
> 61:     String cmd = ProcessTools.getCommandLine(ProcessTools.createTestJvm(args.toArray(String[]::new)));
> 62:     ProcessBuilder pb = new ProcessBuilder("sh", "-c", "ulimit -v 10485760;" + cmd);
The `ulimit -v` parameter should be passed in as well like `MaxRAM`. Then, from the calling context, one can see whether coop should be enabled or not.
test/hotspot/jtreg/gc/arguments/TestUseCompressedOopsFlagsWithUlimit.java line 86:
> 84:     // 1. Verify that MaxRAMPercentage overrides UseCompressedOops Ergo
> 85:     // 2. Verify that UseCompressedOops forces compressed oops limit even
> 86:     //    when other flags are specified.
I don't understand why `MaxRAMPercentage` or `UseCompressedOops` are relevant to this fix/bug.
-------------
Changes requested by ayang (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7938
    
    
More information about the hotspot-gc-dev
mailing list