RFR: 8337563: NMT: rename MEMFLAGS to MemFlag
David Holmes
dholmes at openjdk.org
Thu Aug 15 01:37:50 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)
> I really dislike MemType for its very genericness. MEMFLAGS is a handle into the NMT subsystem. It has no meaning beyond NMT. Yet, it is spread all over the code base. Therefore I really would like an NMT prefix, whatever the name then is.
I agree with @tstuefe here. `MemFlag` and `MemType` sound far too general when this is NMT specific.
My preference to keep the "flags" part of the type was to avoid needing to rename many parameters. The usage of `MEMFLAGS flags` is quite extensive. I would not want to see a partial approach here where we end up with a non-flag type name but a flag variable name.
`NMTTypeFlag` would I hope satisfy Thomas's requirement and avoid the need to do variable renames.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20497#issuecomment-2290293698
More information about the serviceability-dev
mailing list