RFR: 8296157: Rename FileMapInfo::space_at() to region_at() [v2]

Ioi Lam iklam at openjdk.org
Wed Nov 2 15:54:48 UTC 2022


On Wed, 2 Nov 2022 14:54:31 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:

>> Most of the CDS code refers to a memory blocks inside a CDS file as "regions", represented by the type FileMapRegion. The method FileRegion* space_at() has been renamed to region_at() and all instances of its use have been replaced. Verified with tier 1-4 tests.
>
> Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Replaced further instances of space with regions

Changes requested by iklam (Reviewer).

src/hotspot/share/cds/cdsConstants.cpp line 41:

> 39:   { "GenericCDSFileMapHeader::_base_archive_name_offset",  offset_of(GenericCDSFileMapHeader, _base_archive_name_offset) },
> 40:   { "GenericCDSFileMapHeader::_base_archive_name_size",    offset_of(GenericCDSFileMapHeader, _base_archive_name_size)   },
> 41:   { "CDSFileMapHeaderBase::_space[0]",                     offset_of(CDSFileMapHeaderBase, _regions)             },

Need to change to `"CDSFileMapHeaderBase::_regions[0]"`

src/hotspot/share/cds/filemap.hpp line 381:

> 379:   int    compute_header_crc()  const { return header()->compute_crc(); }
> 380:   void   set_header_crc(int crc)     { header()->set_crc(crc); }
> 381:   int    region_crc(int i)      const { return region_at(i)->crc(); }

Code alignment -- please check other changes as well, and try to preserve the existing alignment.

src/hotspot/share/runtime/vmStructs.cpp line 1050:

> 1048:   CDS_ONLY(nonstatic_field(FileMapInfo,        _header,                   FileMapHeader*))                                           \
> 1049:   CDS_ONLY(   static_field(FileMapInfo,        _current_info,             FileMapInfo*))                                             \
> 1050:   CDS_ONLY(nonstatic_field(FileMapHeader,      _regions[0],                 CDSFileMapRegion))                                         \

Code alignment.

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

PR: https://git.openjdk.org/jdk/pull/10937


More information about the hotspot-runtime-dev mailing list