RFR: 8359110: Log accumulated GC and process CPU time upon VM exit [v9]

Jonas Norlinder duke at openjdk.org
Mon Jun 23 14:19:32 UTC 2025


On Mon, 23 Jun 2025 14:07:56 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Jonas Norlinder has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits:
>> 
>>  - Remove incorrect is_gc_operation call after rebase
>>  - More clean up, remove virtual
>>  - Fixes after feedback from @stefank
>>  - Remove extra whitespace
>>  - operation_is_gc -> is_gc_operation per @stefank suggestion
>>  - Only sample if needed
>>  - Remove explicit super call and minor fixes
>>  - Add CPU time tracking for string deduplication to log_gc_vtime
>>  - Replace calls to log_gc_vtime with super-class method calls
>>  - Add bug fix after refactor and fixes for review
>>  - ... and 6 more: https://git.openjdk.org/jdk/compare/c748d358...553edc48
>
> src/hotspot/share/gc/shared/collectedHeap.hpp line 245:
> 
>> 243: 
>> 244:   // Stop any onging concurrent work and prepare for exit.
>> 245:   virtual void stop();
> 
> I find it a bit odd to call `log_gc_vtime` inside this method, given the comment and its name. I wonder if `print_tracing_info` can be used instead, which is invoked before exit as well.

I think it makes sense. We want to log the total GC CPU time before exiting. The latest point we can do that is right before we terminate threads, which we do in when we call `ConcurrentGCThread::stop`. I am open for any suggestions to rename `log_gc_vtime` in case that would help.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25779#discussion_r2161749278


More information about the hotspot-gc-dev mailing list