RFR: 8337658: ZGC: Move soft reference handling out of the driver loop function

Guoxiong Li gli at openjdk.org
Tue Aug 20 09:51:48 UTC 2024


On Tue, 20 Aug 2024 08:59:34 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

> > I don't know whether _uses_clear_all_soft_references_policy is a good name. I may be confused by the name if I read the code first time.
> 
> Could you elaborate on what the problem with the name is?

The two verbs `use` and `clear` are put together, which is curious at first glance. When I dive into the concrete code, I can know the `clear_all` is actually a adjective to describe the `soft_references_policy`. So I don't know whether it would confuse the newbies.

Another problem is whether we should use the third person singular form (use `uses` or `use` in `_uses_clear_all_soft_references_policy` here). I search the code in current HotSpot and both forms are used now. So I am OK with the word `uses`. Maybe we should unify the name rule in the future.

And, my problem may be caused by my poor english, so I will agree with your opinion if you approve this name after reading my comment above.

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

PR Comment: https://git.openjdk.org/jdk/pull/20418#issuecomment-2298444013


More information about the hotspot-gc-dev mailing list