RFR: 8271569: Clean up the use of CDS constants and field offsets [v3]

Yumin Qi minqi at openjdk.java.net
Mon Sep 13 23:12:19 UTC 2021


> Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately.
> The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first.
> 
> Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file.
> 
> Tests: ter1-4
> 
> Thanks
> Yumin

Yumin Qi has updated the pull request incrementally with one additional commit since the last revision:

  Rollled back _base_region_crc to private, changed CDSConst's value from type int to size_t

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/5450/files
  - new: https://git.openjdk.java.net/jdk/pull/5450/files/7bb5ee2e..c290e7c1

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5450&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5450&range=01-02

  Stats: 25 lines in 3 files changed: 2 ins; 2 del; 21 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5450.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5450/head:pull/5450

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


More information about the hotspot-runtime-dev mailing list