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

Jaroslav Bachorik jbachorik at openjdk.java.net
Mon Mar 15 09:25:12 UTC 2021


On Thu, 11 Mar 2021 14:44:10 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Jaroslav Bachorik has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove unused field
>
> src/hotspot/share/gc/shared/space.inline.hpp line 140:
> 
>> 138:   size_t get_dead_space() {
>> 139:     return (_max_deadspace_words - _allowed_deadspace_words) * HeapWordSize;
>> 140:   }
> 
> Hotspot does not use a "get_" prefix for getters. Also not sure why this needs to be private (and the friend class), I would prefer this instead of the friending. Retrieving the actual amount of dead space from a class that calculates it does not  seem something that needs hiding.

The visibility for `_dead_space` was changed based on this comment: https://github.com/openjdk/jdk/pull/2579/files/f69541864e093bc5b250bf625ec75983764ba2bf#r585771280 by @shipilev

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

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



More information about the hotspot-gc-dev mailing list