JDK-8207843 : SA: Add support for Object Histogram with ZGC
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: svc-agent
  • Affected Version: 11,12
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2018-07-19
  • Updated: 2019-02-14
  • Resolved: 2019-02-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
HSDB cannot show Object Histogram in the process which is working with ZGC.


How to reproduce:

  1. Run debuggee with -XX:+UnlockExperimentalVMOptions -XX:+UseZGC

  2. Attach HSDB to the debuggee
    $ jhsdb hsdb --pid <PID>

  3. Show Object Histogram
    [Tools] -> [Object Histogram]


Exception on HSDB console:

```
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)
```
Comments
Would need to enable the tests disabled with zgc if/when this is supported
12-11-2018

Mail thread on zgc-dev discussing why this is hard to implement in the SA for ZGC. http://mail.openjdk.java.net/pipermail/zgc-dev/2018-August/000455.html
08-08-2018

This CR is about adding the missing support. JDK-8209163 is about the reporting of the missing feature, and becomes moot if the support is added.
08-08-2018