8218156: "jcmd VM.metaspace basic" misreports free chunk space
authorstuefe
Fri, 01 Feb 2019 10:27:45 +0100
changeset 53598 69ccc5584e12
parent 53597 04b92d6fc45d
child 53599 0de1f006d3c3
8218156: "jcmd VM.metaspace basic" misreports free chunk space Reviewed-by: zgu
src/hotspot/share/memory/metaspace.cpp
--- a/src/hotspot/share/memory/metaspace.cpp	Wed Jan 30 09:35:07 2019 +0100
+++ b/src/hotspot/share/memory/metaspace.cpp	Fri Feb 01 10:27:45 2019 +0100
@@ -586,15 +586,15 @@
   if (Metaspace::using_class_space()) {
     out->print("   Non-Class:  ");
   }
-  print_human_readable_size(out, Metaspace::chunk_manager_metadata()->free_chunks_total_words(), scale);
+  print_human_readable_size(out, Metaspace::chunk_manager_metadata()->free_chunks_total_bytes(), scale);
   out->cr();
   if (Metaspace::using_class_space()) {
     out->print("       Class:  ");
-    print_human_readable_size(out, Metaspace::chunk_manager_class()->free_chunks_total_words(), scale);
+    print_human_readable_size(out, Metaspace::chunk_manager_class()->free_chunks_total_bytes(), scale);
     out->cr();
     out->print("        Both:  ");
-    print_human_readable_size(out, Metaspace::chunk_manager_class()->free_chunks_total_words() +
-                              Metaspace::chunk_manager_metadata()->free_chunks_total_words(), scale);
+    print_human_readable_size(out, Metaspace::chunk_manager_class()->free_chunks_total_bytes() +
+                              Metaspace::chunk_manager_metadata()->free_chunks_total_bytes(), scale);
     out->cr();
   }
   out->cr();