RFR: 8306733: Remove template parameter of G1DetermineCompactionQueueClosure::free_pinned_region

Albert Mingkun Yang ayang at openjdk.org
Mon Apr 24 11:37:42 UTC 2023


On Mon, 24 Apr 2023 10:39:30 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> Hi all,
> 
>   after [JDK-8298048](https://bugs.openjdk.org/browse/JDK-8298048) G1DetermineCompactionQueueClosure::free_pinned_region() may only be called with humongous regions, so the template parameter is unnecessary. This PR removes it.
> I kept the method itself (not inlined) because I believe its name acts as a good documentation what is done here at the place it is called, even if it's only 3 LOC.
> 
> Testing: local compilation, gha
> 
> Thanks,
>   Thomas

Inlining it is more readable, IMO. For example, it's not obvious whether `add_to_compaction_queue` should be the caller or the callee.

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

Marked as reviewed by ayang (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/13610#pullrequestreview-1397767548


More information about the hotspot-gc-dev mailing list