RFR: 8337563: NMT: rename MEMFLAGS to MemFlag, use consistent name for the argument

Gerard Ziemski gziemski at openjdk.org
Tue Aug 6 13:42:04 UTC 2024


Please review this NMT cleanup change that mainly renames `MEMFLAGS` to `MemType`, as well as cleanups the related arguments names.

This avoids the inconsistencies and confusion currently on display in our code, where we use `flag`, `flags`, `mem_flag`,  `memflags` for the same argument, even in the same file in related APIs.

I made sure to change the related copyright years in all touched files.

This change is rather simple - we are just renaming names, but it touches 103 files unfortunately.

I did not rename any `NMTUtil::flag` (ex. `NMTUtil::flag_to_index()` -> `NMTUtil::type_to_index()`) to keep the amount of code changes smaller. Those APIs should be renamed, but I filed  a followup issue for this [NMT: rename NMTUtil::flag to NMTUtil::type](https://bugs.openjdk.org/browse/JDK-8337836)

There are also further cleanup opportunities here (ex. renaming internal fields from `_memflags` to `_mem_type`), but again these can be addressed in followup issues.

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

Commit messages:
 - undo incorrect rename
 - undo incorrect rename
 - more flag cleanup
 - rename MEMFLAGS to MemType and any related arguments that make sense

Changes: https://git.openjdk.org/jdk/pull/20472/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20472&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8337563
  Stats: 850 lines in 103 files changed: 1 ins; 0 del; 849 mod
  Patch: https://git.openjdk.org/jdk/pull/20472.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20472/head:pull/20472

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


More information about the shenandoah-dev mailing list