RFR: 8332042: Move MEMFLAGS to its own include file [v3]

Thomas Stuefe stuefe at openjdk.org
Tue May 14 07:19:32 UTC 2024


> MEMFLAGS, as well as its enum constants, should live in its own include. 
> 
> The constants are used throughout the code base, often without needing the allocation APIs exposed through allocation.hpp.
> 
> The MEMFLAGS enum def is often needed within NMT itself, again often without needing allocation.hpp.
> 
> ---
> 
> This patch moves the enum to its new file.
> 
> It fixes those `allocation.hpp` includes that where only needed to get MEMFLAGS. It does not fix other includes. 
> 
> For backward compatibility, until we straightened out the dependencies (e.g., fixing all places where we rely on indirect includes), I added memflags.hpp to allocation.hpp.
> 
> I tested (built) on:
> - MacOS aarch64, no precompiled headers, fastdebug
> - Linux x64, no precompiled headers, fastdebug, release, fastdebug crossbuild to aarch64, fastdebug minimal

Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:

  Feedback StefanK

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/19172/files
  - new: https://git.openjdk.org/jdk/pull/19172/files/42361558..2fc98923

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=19172&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19172&range=01-02

  Stats: 41 lines in 4 files changed: 7 ins; 34 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/19172.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19172/head:pull/19172

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


More information about the serviceability-dev mailing list