RFR: 8258431: Provide a JFR event with live set size estimate [v2]

Jaroslav Bachorik jbachorik at openjdk.java.net
Mon Mar 1 15:27:38 UTC 2021


On Mon, 22 Feb 2021 17:16:46 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Jaroslav Bachorik has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains ten additional commits since the last revision:
>> 
>>  - Merge remote-tracking branch 'origin/master' into jb/live_set_1
>>  - Change dead space calculation
>>  - Common PR fixes
>>  - Minor G1 related PR fixes
>>  - Epsilon related PR fixes
>>  - Shenandoah related PR fixes
>>  - Rename ZStatHeap::live() to live_at_mark_end()
>>  - Update event definition and emission
>>  - 8258431: Provide a JFR event with live set size estimate
>
> src/hotspot/share/gc/shared/space.inline.hpp line 189:
> 
>> 187:         oop obj = oop(cur_obj);
>> 188:         size_t obj_size = obj->size();
>> 189:         live_offset += obj_size;
> 
> It seems more natural to me to put this counting into the `DeadSpacer` as this is what this change does. Also, the actual dead space "used" can be calculated from the difference between the `_allowed_deadspace_words` and the maximum (calculated in the constructor of `DeadSpacer`) afaict at the end of evacuation. So there is no need to incur per-object costs during evacuation at all.

Something like https://github.com/openjdk/jdk/pull/2579/commits/b28e7a0959a4655173bf1599bd035ab668196af6 would be ok?

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

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



More information about the hotspot-gc-dev mailing list