RFR: 8331608: Consolidate EncodeGCModeConcurrentFrameClosure and TransformStackChunkClosure

Stefan Karlsson stefank at openjdk.org
Fri May 3 12:46:51 UTC 2024


On Fri, 3 May 2024 12:26:33 GMT, Guoxiong Li <gli at openjdk.org> wrote:

> > There doesn't seem to be a need to place the `derived_cl` closures in the callers. Could you keep it within `do_frame` as we used to do in `TransformStackChunkClosure`?
> 
> If moving it into `do_frame`, everytime the `do_frame` is invoked, we need to construct a `RelativizeClosure` object. Will it cost more running time?

I don't think you need to worry about that. It could have been worth thinking about if there was a large state that needed to be set up for every frame, but that's not the case here. The compiler will likely handle this well. If you are still not convinced I think you could disassemble the code with and without the suggestion and compare the two.

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

PR Comment: https://git.openjdk.org/jdk/pull/19084#issuecomment-2092944650


More information about the hotspot-dev mailing list