TBObjectHistogram histogram = new TBObjectHistogram();
err.println("Iterating over heap. This may take a while...");
long startTime = System.currentTimeMillis();
heap.iterate(histogram);
long endTime = System.currentTimeMillis();
histogram.printOnPerm(out);
float secs = (float) (endTime - startTime) / 1000.0f;
err.println("Heap traversal took " + secs + " seconds.");
}
public static void main(String[] args) {