RFR: 8258431: Provide a JFR event with live set size estimate [v6]
Jaroslav Bachorik
jbachorik at openjdk.java.net
Tue Mar 2 09:07:55 UTC 2021
On Mon, 22 Feb 2021 17:10:28 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>> Jaroslav Bachorik has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Attempt to fix G1 live set size computation
>
> src/hotspot/share/gc/parallel/parallelScavengeHeap.inline.hpp line 49:
>
>> 47: _young_live = young_gen()->used_in_bytes();
>> 48: _eden_live = young_gen()->eden_space()->used_in_bytes();
>> 49: _old_live = old_gen()->used_in_bytes();
>
> `_young_live` already seems to contain `_eden_live` looking at the implementation of `PSYoungGen::used_in_bytes()`:
>
> I.e.
>
> `size_t PSYoungGen::used_in_bytes() const {
> return eden_space()->used_in_bytes()
> + from_space()->used_in_bytes(); // to_space() is only used during scavenge
> }
> `
>
> but maybe I'm wrong here.
This seems like a correct summary - I have updated the implementation.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2579
More information about the hotspot-gc-dev
mailing list