RFR: 8337563: NMT: rename MEMFLAGS to MemFlag
David Holmes
dholmes at openjdk.org
Mon Sep 2 04:06:28 UTC 2024
On Wed, 7 Aug 2024 17:13:06 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:
> Please review this cleanup, where we rename `MEMFLAGS` to `MemType`.
>
> `MEMFLAGS` implies that we can use more than one at the same time, but those are exclusive values, so `MemType` is much more suitable name.
>
> There is a bunch of other related cleanup that we can do, but I will leave for follow up issues such as [NMT: rename NMTUtil::flag to NMTUtil::type](https://bugs.openjdk.org/browse/JDK-8337836)
FWIW as I recall the suggestion to include NMT in the name in some form was to make it clear that these kinds of parameter, which appear all over the place, are needed because of NMT and are not inherently part of whatever API they appear in. Whether that happens via a namespace, a nested enum, or a simple prefix, I don't really care except to say that anything that can then result in dropping the NMT in the source code (e.g. via a using directive) completely defeats the purpose of having it in the first place. So if there is no good answer here than I guess we just drop NMT from the name.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20497#issuecomment-2323770639
More information about the serviceability-dev
mailing list