RFR: 8314651: G1: Fix -Wconversion warnings in static fields of HeapRegion
    Albert Mingkun Yang 
    ayang at openjdk.org
       
    Tue Aug 29 09:23:10 UTC 2023
    
    
  
On Tue, 29 Aug 2023 08:38:36 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>> Use unsigned type for heap-region-size related shifts in HeapRegion.
>>  
>> Test: tier1-3
>
> src/hotspot/share/jvmci/vmStructs_jvmci.cpp line 820:
> 
>> 818: 
>> 819: #define VM_STRUCTS_JVMCI_G1GC(nonstatic_field, static_field) \
>> 820:   static_field(HeapRegion, LogOfHRGrainBytes, uint32_t)
> 
> Suggestion:
> 
>   static_field(HeapRegion, LogOfHRGrainBytes, uint)
> 
> 
> Seems to compile just fine here.
That was my original attempt, but JVMCI related tests failed with `uint`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15360#discussion_r1308475030
    
    
More information about the hotspot-dev
mailing list