RFR: 8307348 - Parallelize heap walk for ObjectCount(AfterGC) JFR event collection [v7]

Thomas Schatzl tschatzl at openjdk.org
Mon May 8 08:21:27 UTC 2023


On Fri, 5 May 2023 16:18:28 GMT, olivergillespie <duke at openjdk.org> wrote:

>> src/hotspot/share/gc/shared/gcVMOperations.cpp line 175:
>> 
>>> 173:     // Can't run with more threads than provided by the WorkerThreads.
>>> 174:     const uint capped_parallel_thread_num = MIN2(_parallel_thread_num, workers->max_workers());
>>> 175:     WithActiveWorkers with_active_workers(workers, capped_parallel_thread_num);
>> 
>> I would *almost* rely on the workgang's 'active_workers()' here because all collectors set this proportional to heap size (people tend to start 128M VMs on hundreds-of-thread machines... ). The problem is that one heap inspection VM operation. Maybe put the `WithActiveWorkers` there and use `workers->active_workers()` here?
>> 
>> This is just a suggestion.
>
> Sorry, I don't think I understand the suggestion. Are you suggesting to use WithActiveWorkers only for the heap inspection VM op, and workers->active_workers() everywhere else (for the collector use-case)?
> 
>> The problem is that one heap inspection VM operation. Maybe put the WithActiveWorkers there
> 
> This area *is* that one heap inspection VM operation, isn't it?

You are right, I misread the code. Ignore my comment :) Ship it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13774#discussion_r1187164921


More information about the hotspot-gc-dev mailing list