RFR: JDK-8171084: heapdump/JMapHeapCore fails with java.lang.RuntimeException: Heap segment size overflow
David Holmes
david.holmes at oracle.com
Fri Jan 20 01:57:03 UTC 2017
Hi Jini,
Seems reasonable. I don't fully understand all the details here but have
one non trivial comment ...
On 20/01/2017 2:40 AM, Jini George wrote:
> Hi, Requesting for reviews for the following SA issue:
>
> https://bugs.openjdk.java.net/browse/JDK-8171084
> Webrev:<http://cr.openjdk.java.net/%7Ejgeorge/8171084/webrev.00/>http://cr.openjdk.java.net/~jgeorge/8171084/webrev.00/
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
This change:
870 protected void writeInstance(Instance instance, int length)
throws IOException {
seems incorrect. It adds a length parameter that is unused and also
creates an overload, rather than override of the inherited version. As a
result this code:
612 writeInstance(instance);
will call the super version in AbstractHeapGraphWriter.
Minor nit:
379 private static final long MAX_U4_VALUE = 4294967295L;
would be clearer as:
379 private static final long MAX_U4_VALUE = 0xFFFFFFFFL;
---
test/serviceability/sa/LingeredAppWithLargeArray.java
Style nit:
27 public int hugeArray[];
should be
27 public int[] hugeArray;
but why public ??
I don't know how LingeredApp works, but this looks odd:
32 public static void main(String args[]) {
33 LingeredAppWithLargeArray appObject = new
LingeredAppWithLargeArray();
34 LingeredApp.main(args);
35 }
as the appObject is never used. ??
---
test/serviceability/sa/TestHeapDumpForLargeArray.java
Why is the test excluded on Mac?
Thanks,
David
-----
> Thanks,
> Jini.
More information about the serviceability-dev
mailing list