RFR: 8271569: Rename cdsoffsets.cpp to cdsConstants.cpp [v2]

Yumin Qi minqi at openjdk.java.net
Mon Sep 13 21:36:42 UTC 2021


On Mon, 13 Sep 2021 20:38:41 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Make array of offsets and constants member of class CDSConstants and made CDSConstants a friend class of accessed classes
>
> src/hotspot/share/cds/cdsConstants.cpp line 49:
> 
>> 47:   { "dynamic_magic",                (int)CDS_DYNAMIC_ARCHIVE_MAGIC },
>> 48:   { "int_size",                     sizeof(int)                    },
>> 49:   { "CDSFileMapRegion_size",        sizeof(CDSFileMapRegion)       },
> 
> Should be `(int)sizeof(int)` because the type of `sizeof(...)` is implementation-defined. See https://en.cppreference.com/w/cpp/types/size_t

Now that all almost all (except for 'magic') with size_t, we should use name vs size_t in the struct and get functions, cast when return from vm in whiteBox.cpp.

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

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


More information about the hotspot-runtime-dev mailing list