RFR: 8361055: Serial: Inline SerialHeap::process_roots
Stefan Karlsson
stefank at openjdk.org
Mon Jun 30 09:58:37 UTC 2025
On Mon, 30 Jun 2025 09:20:32 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> > Not really convinced about this change: if there is need to add a root now, you need to look at three places instead of one.
>
> That's true and IMO desirable. If a new kind of roots are added, we need to think carefully, how (young/old) gcs and different phases process it.
>
> > The parameter to select particular additional roots seems clear enough to me.
>
> Well, I guess it's different style. For example, with this refactoring (untanglement), I noticed that for young-gc, `Threads::oops_do` doesn't need the second argument (`nmethod_cl` can be set to null) to skip nmethod scanning. I suspect this redundancy will be hard to spot in the original style. (I will do that after this refactoring.)
FWIW, I tend to like these kind of untanglements. We've gone back and forth w.r.t. the style in the root processors and making them more generic tends to make the code harder to understand, IMHO.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26038#issuecomment-3018529599
More information about the hotspot-gc-dev
mailing list