RFR: 8272611: Use parallel heap inspection when print classhisto info in gc log
Bin Liao
github.com+3094961+buddyliao at openjdk.java.net
Fri Aug 27 09:11:24 UTC 2021
On Mon, 23 Aug 2021 10:50:45 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>> src/hotspot/share/gc/shared/collectedHeap.cpp line 551:
>>
>>> 549: ResourceMark rm;
>>> 550: LogStream ls(lt);
>>> 551: uint parallel_thread_num = MAX2<uint>(1, (uint)os::initial_active_processor_count() * 3 / 8);
>>
>> Where do the magic numbers for the formula come from? Please consider using the ergonomically determined number of threads (`CollectedHeap::safepoint_workers()->active_workers()`)? (Maybe change this in another CR as other reviewers think is better, looking whether there is a significant difference between these numbers)
>
> Note: this is probably copy&pasted from `ClassHistogramDCmd::execute`; instead of the copy&paste please at least add something like a static `default_parallel_thread_num()` method to `VM_GC_HeapInspection`.
> Where do the magic numbers for the formula come from? Please consider using the ergonomically determined number of threads (`CollectedHeap::safepoint_workers()->active_workers()`)? (Maybe change this in another CR as other reviewers think is better, looking whether there is a significant difference between these numbers)
Thank you for your advice, it seems that (CollectedHeap::safepoint_workers()->active_workers()) looks better.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5158
More information about the hotspot-gc-dev
mailing list