changeset 16091:69220322bc14

show array lengths in allocation records produced by AllocSpy
author Doug Simon <doug.simon@oracle.com>
date Fri, 13 Jun 2014 11:31:17 +0200
parents 32ddc8096f4c
children 51ba6c521922
files graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/AllocSpy.java
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/AllocSpy.java	Fri Jun 13 09:06:06 2014 +0200
+++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/AllocSpy.java	Fri Jun 13 11:31:17 2014 +0200
@@ -39,11 +39,11 @@
  * trace is governed by the value of the "AllocSpy.ContextSize" system property (default is 5).
  * <p>
  * Using this facility requires using -javaagent on the command line. For example:
- * 
+ *
  * <pre>
  * mx --vm server unittest -javaagent:lib/java-allocation-instrumenter.jar -dsa -DAllocSpy.ContextSize=6 BC_iadd2
  * </pre>
- * 
+ *
  * @see #SampleBytes
  * @see #SampleInstances
  * @see #HistogramLimit
@@ -237,8 +237,8 @@
                     } else {
                         if (!excludeFrame(className)) {
                             sb.append("type=").append(desc);
-                            if (count != 1) {
-                                sb.append("[]");
+                            if (count != -1) {
+                                sb.append('[').append(count).append(']');
                             }
                             append(sb.append('\n'), e);
                         }