RFR: 8320370: NMT: Change MallocMemorySnapshot to simplify code. [v3]

Johan Sjölen jsjolen at openjdk.org
Thu Nov 23 15:48:10 UTC 2023


On Thu, 23 Nov 2023 13:37:04 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> Still looks good. Nice simplificaiton.

Thanks for the re-approval!

> > > > Nice clean up!
> > > > Just one question: I'm probably missing something here, but did we have to change from `ResourceObj` to `AnyObj` for this change to work?
> > > 
> > > 
> > > Hi Gerard, no I think it is unnecessary to do this change to make it work (I haven't checked). I do think keeping it as `AnyObj` is a good idea however, as `MallocMemorySnapshot` is never resource allocated.
> > 
> > 
> > Why not make it a simple object then? Why derive from anything at all?
> > (Update: I am fine with the current state of the patch; up to you)
> 
> +1 Please don't use AnyObj unless you really need multiple allocation strategies.

I'm very happy to hear this :).

@gerard-ziemski, would you mind re-approving also?

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

PR Comment: https://git.openjdk.org/jdk/pull/16724#issuecomment-1824639555


More information about the hotspot-runtime-dev mailing list