RFR: 8258431: Provide a JFR event with live set size estimate [v9]
Jaroslav Bachorik
jbachorik at openjdk.java.net
Mon Mar 8 17:34:12 UTC 2021
On Tue, 2 Mar 2021 17:34:32 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Jaroslav Bachorik has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add tests for the heap usage summary event
>
> src/hotspot/share/gc/shared/space.inline.hpp line 190:
>
>> 188: oop obj = oop(cur_obj);
>> 189: size_t obj_size = obj->size();
>> 190: compact_top = cp->space->forward(obj, obj_size, cp, compact_top);
>
> This change seems superfluous now. Inline `obj_size` back?
Done
> src/hotspot/share/gc/shared/space.hpp line 555:
>
>> 553: size_t live() const {
>> 554: return used() - _dead_space;
>> 555: }
>
> Move it a few lines down, so `capacity`, `used`, `live` line up?
Ok. I did my best to make the code look nice there :)
> src/hotspot/share/gc/shared/collectedHeap.hpp line 218:
>
>> 216: virtual size_t capacity() const = 0;
>> 217: virtual size_t used() const = 0;
>> 218: // Returns the estimate of live set size. Because live set changes over time,
>
> I believe a blank line is in order here, look at other comments in the same header.
Done
> src/hotspot/share/gc/shared/space.inline.hpp line 90:
>
>> 88:
>> 89: public:
>> 90: size_t _dead_space;
>
> Should this really be "public"? Maybe `friend`-ing with the only user is better?
Yep. Befriended.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2579
More information about the hotspot-jfr-dev
mailing list