RFR: 8272611: Use parallel heap inspection when print classhisto info in gc log [v2]

Thomas Schatzl tschatzl at openjdk.java.net
Mon Aug 30 12:12:28 UTC 2021


On Mon, 30 Aug 2021 11:31:46 GMT, Bin Liao <github.com+3094961+buddyliao at openjdk.org> wrote:

>> This patch helps to enhance the heap inspection with parallel threads when print classhisto info in gc log.
>> 
>> I have built it on linux x86_64 and run test-tier1 successfully
>> 
>> ---------
>> ### Progress
>> - [x] Change must not contain extraneous whitespace
>> - [x] Commit message must refer to an issue
>> - [ ] Change must be properly reviewed
>> 
>> 
>> 
>> ### Reviewing
>> <details><summary>Using <code>git</code></summary>
>> 
>> Checkout this PR locally: \
>> `$ git fetch https://git.openjdk.java.net/jdk pull/5158/head:pull/5158` \
>> `$ git checkout pull/5158`
>> 
>> Update a local copy of the PR: \
>> `$ git checkout pull/5158` \
>> `$ git pull https://git.openjdk.java.net/jdk pull/5158/head`
>> 
>> </details>
>> <details><summary>Using Skara CLI tools</summary>
>> 
>> Checkout this PR locally: \
>> `$ git pr checkout 5158`
>> 
>> View PR using the GUI difftool: \
>> `$ git pr show -t 5158`
>> 
>> </details>
>> <details><summary>Using diff file</summary>
>> 
>> Download this PR as a diff file: \
>> <a href="https://git.openjdk.java.net/jdk/pull/5158.diff">https://git.openjdk.java.net/jdk/pull/5158.diff</a>
>> 
>> </details>
>
> Bin Liao has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8272611: Use parallel heap inspection when print classhisto info in gc log

Changes requested by tschatzl (Reviewer).

src/hotspot/share/gc/shared/collectedHeap.cpp line 552:

> 550:     LogStream ls(lt);
> 551:     uint parallel_thread_num = safepoint_workers()->active_workers();
> 552:     VM_GC_HeapInspection inspector(&ls, false /* request full gc */, parallel_thread_num);

I would prefer the same issue would also be fixed in the other place (`ClassHistogramDCmd::execute`), using a static method as suggested. Otherwise the problem will exist forever.

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

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



More information about the hotspot-gc-dev mailing list