changeset 22733:61060412fd34

6656031: SA: jmap -permstat number of classes is off by 1 Reviewed-by: sla, dholmes
author jbachorik
date Thu, 30 Jan 2014 09:41:45 +0100
parents 7c65ca499b9b
children 41757c1f3946
files hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/ClassLoaderStats.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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) {