RFR: 8335007: Inline OopMapCache table

Stefan Karlsson stefank at openjdk.org
Wed Jun 26 09:14:09 UTC 2024


On Wed, 26 Jun 2024 08:28:25 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> > I'm not a maintainer of this code, but this change looks good to me.
> > I reacted a little bit when I saw the `_size` usage in the array expression, thinking that you were using a member variable. It turns out that it is just a constant with a very unconventionally named (for HotSpot) constant. Would anyone object if we/I changed the name of these constants in a follow-up RFE?
> 
> I am fine with renaming it to something that does not look like a member. "size" ? "tablesize"? Also, make it a static constexpr? Do we still use enums for constants?

The class above uses names the constants like `bits_per_entry`, so maybe just drop the `_` and name it `size`? (I tend to *not* like the macro-like names like SIZE)

Most of us try to transition away from enums and instead use explicit type (Not everyone, though). I think there's no consensus around const vs constxpr, but I don't mind seeing things changed to constexpr.

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

PR Comment: https://git.openjdk.org/jdk/pull/19882#issuecomment-2191203368


More information about the hotspot-runtime-dev mailing list