RFR: 8293623: Simplify G1ConcurrentRefineThreadControl [v3]

Kim Barrett kbarrett at openjdk.org
Wed Dec 13 15:53:45 UTC 2023


On Tue, 12 Dec 2023 12:23:42 GMT, Lei Zaakjyu <duke at openjdk.org> wrote:

>> 8293623: Simplify G1ConcurrentRefineThreadControl
>
> Lei Zaakjyu has updated the pull request incrementally with one additional commit since the last revision:
> 
>   use 'append'

Changes requested by kbarrett (Reviewer).

src/hotspot/share/gc/g1/g1ConcurrentRefine.hpp line 47:

> 45: class G1ConcurrentRefineThreadControl {
> 46:   G1ConcurrentRefine* _cr;
> 47:   GrowableArray<G1ConcurrentRefineThread*>* _threads;

Rather than a pointer to a GA, instead make it a GA value.  And remove _max_num_threads
member, because we can use the GA's capacity for that.

Also, it should be a GrowableArrayCHeap<G1ConcurrentRefineThread*, mtGC>.

I also think the max-threads value should be passed to the constructor, and the thread initialized
with that as it's capacity and a size of zero.

That's going to affect the cpp changes a lot, so I've not bothered even looking at them yet.

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

PR Review: https://git.openjdk.org/jdk/pull/17077#pullrequestreview-1779946130
PR Review Comment: https://git.openjdk.org/jdk/pull/17077#discussion_r1425543264


More information about the hotspot-gc-dev mailing list