Wed, 23 Aug 2017 04:07:36 -0400
6656031: SA: jmap -permstat number of classes is off by 1
Reviewed-by: sla, dholmes
agent/src/share/classes/sun/jvm/hotspot/tools/ClassLoaderStats.java | file | annotate | diff | comparison | revisions |
1.1 --- a/agent/src/share/classes/sun/jvm/hotspot/tools/ClassLoaderStats.java Mon Aug 21 11:34:41 2017 -0400 1.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/tools/ClassLoaderStats.java Wed Aug 23 04:07:36 2017 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -103,11 +103,12 @@ 1.11 } 1.12 1.13 SystemDictionary dict = VM.getVM().getSystemDictionary(); 1.14 - dict.classesDo(new SystemDictionary.ClassAndLoaderVisitor() { 1.15 - public void visit(Klass k, Oop loader) { 1.16 + dict.classesDo(new SystemDictionary.ClassVisitor() { 1.17 + public void visit(Klass k) { 1.18 if (! (k instanceof InstanceKlass)) { 1.19 return; 1.20 } 1.21 + Oop loader = ((InstanceKlass) k).getClassLoader(); 1.22 LoaderData ld = (loader != null) ? (LoaderData)loaderMap.get(loader) 1.23 : bootstrapLoaderData; 1.24 if (ld != null) {