提交 24dfe502 编写于 作者: D dbuck

6656031: SA: jmap -permstat number of classes is off by 1

Reviewed-by: sla, dholmes
上级 cf80a2fe
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -103,11 +103,12 @@ public class ClassLoaderStats extends Tool {
}
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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册