RFR: 8341332: Refactor array chunking statistics counters

Zhengyu Gu zgu at openjdk.org
Mon Oct 7 14:08:38 UTC 2024


On Fri, 4 Oct 2024 17:29:43 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> I hadn't noticed the associated JBS issue and that you'd started working on it. I've also started working on the same problem, but taking a different approach.
> 
> I think the approach being taken in this PR is continuing a problematic design approach already present in the existing code. I'd rather we didn't do that.
> 
> Virtual functions tend to combine poorly with class templates. I think there's not actually any need for runtime polymorphism in the taskqueue stuff. Adding more is not appealing to me.
> 
> I think the basic taskqueue and its associated statistics form a generic utility that could be used anywhere one needs parallel task queues with work stealing (so long as the tasks can meet the necessary requirements - see the discussion with the implementation of pop_global). I don't think inheritance is the best way to augment them. I think the existing use of inheritance for overflow queues, and inclusion of overflow stats in TaskQueueStats, are design errors. This PR proposes to do more of that.
> 
> I think task specifics ought to be kept separate from the generic taskqueue, which doesn't really need to know anything about them. So I think, for example, that the various task types ought not be in the taskqueue files, but should be in their own files.

Okay, my intention was to consolidate partial array stats collecting/reporting so that I can deduplicate code for consolidating task queues. Glad to hear that you are working on refactoring task queue, it is the area that is very hard to make changes.

Please feel free to take over this CR.

@kimbarrett is working on the same issue with different approach.

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

PR Comment: https://git.openjdk.org/jdk/pull/21343#issuecomment-2397031956
PR Comment: https://git.openjdk.org/jdk/pull/21343#issuecomment-2397033465


More information about the hotspot-gc-dev mailing list