ZGC: RFR: 8207843: HSDB cannot show Object Histogram when ZGC is working

Yasumasa Suenaga yasuenag at gmail.com
Wed Aug 8 08:34:39 UTC 2018


On 2018/08/08 17:07, Per Liden wrote:
> On 08/08/2018 10:02 AM, Per Liden wrote:
>> Hi,
>>
>> On 08/08/2018 10:00 AM, Yasumasa Suenaga wrote:
>>> Hi Per,
>>>
>>> Will class unloading be occurred after relocation?
>>
>> No, before relocation.
> 
> But it doesn't really matter when it happens, since there can still be unreachable objects with dead class pointers in ZPages that were not relocated.

I think we can include all unreachable objects in the histogram.
For example, ParallelScavengeHeap in SA collects all objects between bottom() and top() in all spaces like `jcmd GC.class_histogram` with -all option.

So I think we can fix Object Histogram for ZGC if we resolve dead class pointer.
If SA can know ZGC phase, we might resolve it as following:


   * GC is working:
       Check colored pointer to collect oops.

   * GC is NOT working:
       Collect all oops in ZPage.


Thanks,

Yasumasa


> /Per



More information about the hotspot-gc-dev mailing list