RFR: 8341332: Refactor array chunking statistics counters
Kim Barrett
kbarrett at openjdk.org
Fri Oct 4 17:32:38 UTC 2024
On Fri, 4 Oct 2024 01:41:50 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
> Please review this patch that consolidates array chunking statistics counting and reporting inside task queue and task queue set. Also consolidating partial array chunking and processing into `PartialArrayProcessor` to reduce duplicate code.
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.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21343#issuecomment-2394206125
More information about the hotspot-gc-dev
mailing list