public void printPerm() {
PrintStream out = System.out;
PrintStream err = System.err;
// Ready to go with the database...
ObjectHeap heap = VM.getVM().getObjectHeap();
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.");
}