RFR: 8280397: Factor out task queue statistics printing

Per Liden pliden at openjdk.java.net
Mon Jan 24 09:19:10 UTC 2022


On Mon, 24 Jan 2022 08:55:40 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> 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...

I'm not sure I follow. Can't we just move the whole function as is? I'm thinking all collectors want to log in the same way, so no need to separate out the logging setup.

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

PR: https://git.openjdk.java.net/jdk/pull/7174



More information about the hotspot-gc-dev mailing list