use of sun.jvm.hotspot.oops.DefaultHeapVisitor in project spf4j by zolyfarkas.
the class VMHistograms method getHeapInstanceCountsHistogram.
public static TObjectIntMap<Klass> getHeapInstanceCountsHistogram() {
final TObjectIntMap<Klass> counts = new TObjectIntHashMap(10240);
VM vm = sun.jvm.hotspot.runtime.VM.getVM();
vm.getObjectHeap().iterate(new DefaultHeapVisitor() {
@Override
public boolean doObj(final Oop oop) {
counts.increment(oop.getKlass());
oop.getKlass();
return false;
}
});
return counts;
}
Aggregations