# HG changeset patch # User jbachorik # Date 1391071305 -3600 # Node ID 61060412fd344737b6569a25bd3ca9a4b627577a # Parent 7c65ca499b9b88233ae73e12cfeda8eca0769a2a 6656031: SA: jmap -permstat number of classes is off by 1 Reviewed-by: sla, dholmes diff -r 7c65ca499b9b -r 61060412fd34 hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/ClassLoaderStats.java --- 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) {