"instance_stats["+l.size()+ " of "+numInstances+"]:"+ "\n  type:            "+type);
classname+" instances sorted by largest \"size()\""+ "\nshowing "+n+" of "+iss.length);
  public static void printInstanceStats(      MemoryStats tracker,      String type,      int maxRows,      int maxLines) {    ClassTracker ct = tracker.getClassTracker(type);    if (ct == null) {      System.out.println("not tracked: "+type);      return;    }    ClassStats cs = ct.getOverallStats();    long numInstances = cs.getInstances();    InstanceStats[] iss = ct.update();    List l = trim(Arrays.asList(iss), maxRows);    Collections.sort(l, Comparators.DECREASING_SIZE_COMPARATOR);    System.out.println(        "instance_stats["+l.size()+ " of "+numInstances+"]:"+        "\n  type:            "+type);    for (int i = 0, n = l.size(); i < n; i++) {      InstanceStats is = (InstanceStats) l.get(i);      Object o = is.get();      System.out.println(          "    hashcode:         "+          (o == null ? "null" : Integer.toHexString(o.hashCode())));      System.out.println("    current_size:     "+is.getSize());      System.out.println("    max_size:         "+is.getMaximumSize());      System.out.println("    current_capacity: "+is.getCapacity());      System.out.println("    max_capacity:     "+is.getMaximumCapacity());      System.out.println("    agent:            "+is.getAgentName());      System.out.print(  "    stack[");      Throwable throwable = is.getThrowable();      if (throwable == null) {        System.out.println("]");        continue;      }      StackTraceElement ste[] = throwable.getStackTrace();      int LINES_TO_SKIP = 4; // lines within the profiler      int lines = Math.min(ste.length, maxLines+LINES_TO_SKIP);      System.out.println((lines-LINES_TO_SKIP)+" of "+ste.length+"]:");      for (int j = LINES_TO_SKIP; j < lines; j++) {        System.out.println(            "    "+            ste[j].getClassName()+"."+            ste[j].getMethodName()+"("+            ste[j].getFileName()+":"+            ste[j].getLineNumber()+")");      }    }  }