8236968: jmap -clstats fails to work after JDK-8232759

Make jmap -clstats call jcmd VM.classloader_stats instead which better matches the documentation

Reviewed-by: dholmes, cjplummer
This commit is contained in:
Coleen Phillimore 2020-01-15 08:08:54 -05:00
parent 8d2e11397a
commit 7707e32b00

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2020, 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
@ -115,7 +115,7 @@ public class JMap {
} else if (option.equals("-finalizerinfo")) {
executeCommandForPid(pid, "jcmd", "GC.finalizer_info");
} else if (option.equals("-clstats")) {
executeCommandForPid(pid, "jcmd", "GC.class_stats");
executeCommandForPid(pid, "jcmd", "VM.classloader_stats");
} else {
usage(1);
}