6656031: SA: jmap -permstat number of classes is off by 1
Reviewed-by: sla, dholmes
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/ClassLoaderStats.java Tue Jan 28 06:26:36 2014 -0800
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/ClassLoaderStats.java Thu Jan 30 09:41:45 2014 +0100
@@ -103,11 +103,12 @@
}
SystemDictionary dict = VM.getVM().getSystemDictionary();
- dict.classesDo(new SystemDictionary.ClassAndLoaderVisitor() {
- public void visit(Klass k, Oop loader) {
+ dict.classesDo(new SystemDictionary.ClassVisitor() {
+ public void visit(Klass k) {
if (! (k instanceof InstanceKlass)) {
return;
}
+ Oop loader = ((InstanceKlass) k).getClassLoader();
LoaderData ld = (loader != null) ? (LoaderData)loaderMap.get(loader)
: bootstrapLoaderData;
if (ld != null) {