RFR: 8313708: NMT: cleanup _mst_marker

Thomas Stuefe stuefe at openjdk.org
Thu Aug 31 15:11:04 UTC 2023


On Thu, 31 Aug 2023 14:57:15 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:

> > I don't like much the increased complexity of `MallocSiteTable::lookup_or_add`. It now needs two args to let the caller track the MST bucket
> 
> Yes, that's the only thing that bothers me about my proposed fix, but I can't think of a different way, other than bit sizzling it into one value (like it was), or removing "const" from BucketInfo fields. I thought that the best compromise was to do it the way I did, but I understand that it is not ideal.
> 
> > and exposes implementation details: "marker" had been a neutral term, "bucketXX" implies an open hash table and therefore exposes details that may change in the future.
> 
> When reading this code, without prior knowledge of it, I had no idea what the "marker" was and how much attention I should pay to it. With the name like "bucket" it actually tells me something right away, even if at the same time it gives away the implementation. From the point of view of someone learning the NMT code, I like it better this way, but I do see how it might be a personal choice.
> 
> Thank you for accepting this change, even if you don't 100% agree with it.

Sure, no problem. Sorry for the delay, I had completely forgotten about this issue.

Cheers, Thomas

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

PR Comment: https://git.openjdk.org/jdk/pull/15145#issuecomment-1701229896


More information about the hotspot-runtime-dev mailing list