ZGC: RFR: 8207843: HSDB cannot show Object Histogram when ZGC is working
Yasumasa Suenaga
yasuenag at gmail.com
Wed Aug 8 08:08:52 UTC 2018
Hi Sharath,
Thank you for your comment!
On 2018/08/08 13:35, Sharath Ballal wrote:
> Hi Yasumasa,
>
> These comments may not make sense now that Per told that this way of iterating the heap doesn’t work for ZGC. But I am still giving them since I went through the changes.
I think we need to work after clarifying class unloading in ZGC.
So I will fix your comment later.
> http://cr.openjdk.java.net/~ysuenaga/JDK-8207843/webrev.00/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/z/ZPage.java.udiff.html
>
> + public int refcount() {
> + return topField.getJInt(addr);
> + }
> +
>
> I think you wanted to return "refcountField.getJInt(addr)" here.
You are correct! I'll fix it.
> http://cr.openjdk.java.net/~ysuenaga/JDK-8207843/webrev.00/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/z/ZAddressRangeMapForPageTable.java.frames.html
>
> 71 long size() {
> 72 return ZGlobals.ZAddressOffsetMax >>> ZGlobals.ZPageSizeMinShift;
> 73 }
>
> I am not clear about this unsigned right shift, how does this give the size ? Also ZGlobals.ZPageSizeMinShift can be replaced by AddressRangeShift.
This method comes from ZAddressRangeMap<T, AddressRangeShift>::size() in zAddressRangeMap.inline.hpp .
ZAddressOffsetMax is declared as size_t, so we need to treat it as unsigned value.
Thanks,
Yasumasa
> Thanks,
> Sharath
>
>
> -----Original Message-----
> From: Yasumasa Suenaga [mailto:yasuenag at gmail.com]
> Sent: Thursday, July 26, 2018 7:22 PM
> To: serviceability-dev at openjdk.java.net; zgc-dev at openjdk.java.net; hotspot-gc-dev
> Subject: ZGC: RFR: 8207843: HSDB cannot show Object Histogram when ZGC is working
>
> CC'ing to hotspot-gc-dev
>
>
> On 2018/07/26 21:30, Yasumasa Suenaga wrote:
>> PING: Could you review it?
>>
>>> webrev: http://cr.openjdk.java.net/~ysuenaga/JDK-8207843/webrev.00/
>>
>>
>> Yasumasa
>>
>>
>> On 2018/07/19 23:03, Yasumasa Suenaga wrote:
>>> Hi all,
>>>
>>> Please review this webrev.
>>>
>>> JBS: https://bugs.openjdk.java.net/browse/JDK-8207843
>>> webrev: http://cr.openjdk.java.net/~ysuenaga/JDK-8207843/webrev.00/
>>>
>>> I encountered AssertionFailure when I attached HSDB to the process which is working with ZGC as below:
>>>
>>> sun.jvm.hotspot.utilities.AssertionFailure: Unexpected CollectedHeap type: sun.jvm.hotspot.gc.z.ZCollectedHeap
>>> at jdk.hotspot.agent/sun.jvm.hotspot.utilities.Assert.that(Assert.java:32)
>>> at jdk.hotspot.agent/sun.jvm.hotspot.oops.ObjectHeap.collectLiveRegions(ObjectHeap.java:448)
>>> at jdk.hotspot.agent/sun.jvm.hotspot.oops.ObjectHeap.iterate(ObjectHeap.java:173)
>>> at jdk.hotspot.agent/sun.jvm.hotspot.HSDB$VisitHeap.run(HSDB.java:1741)
>>> at jdk.hotspot.agent/sun.jvm.hotspot.utilities.WorkerThread$MainLoop.run(WorkerThread.java:70)
>>> at java.base/java.lang.Thread.run(Thread.java:832)
>>>
>>> ObjectHeap#collectLiveRegions() branches by instance type of CollectedHeap. However it does not support ZCollectedHeap.
>>> So I add ZCollectedHeap to it and add some methods to iterate ZPageTable.
>>>
>>>
>>> Thanks,
>>>
>>> Yasumasa
More information about the serviceability-dev
mailing list