RFR: 8280397: Factor out task queue statistics printing
Thomas Schatzl
tschatzl at openjdk.java.net
Mon Jan 24 08:59:09 UTC 2022
On Mon, 24 Jan 2022 08:44:32 GMT, Per Liden <pliden at openjdk.org> wrote:
>> Hi all,
>>
>> can I have reviews for this change that makes task queue (set) printing available in a central place so that not every user needs to reinvent the wheel?
>> As example I wired up existing G1/Parallel GC young collection statistics printing, but I intend to add this for full gcs too; since ZGC and Shenandoah do not print task queues at all I do not intend to do that at least initially.
>> Currently the main printing method is in `CollectedHeap`, but I can move it elsewhere if needed (all but Serial GC do use task queue sets though, so.....).
>>
>> Testing: gha (building), local testing
>>
>> Thanks,
>> Thomas
>
> src/hotspot/share/gc/shared/collectedHeap.inline.hpp line 55:
>
>> 53: #if TASKQUEUE_STATS
>> 54: template <class T, MEMFLAGS F>
>> 55: inline void CollectedHeap::print_and_reset_taskqueue_stats(GenericTaskQueueSet<T, F>* queue_set, const char* label) const {
>
> Can we please move this function to `GenericTaskQueueSet`? It seems to have little to do with `CollectedHeap`.
That is fine with me; the reason I put it there has been that it sets up the logging specifically for GC which I did feel not appropriate for the taskqueue. Passing an outputstream to this would require to add per-collector helper methods again...
-------------
PR: https://git.openjdk.java.net/jdk/pull/7174
More information about the hotspot-gc-dev
mailing list