src/hotspot/share/services/diagnosticCommand.hpp
changeset 49053 0b61efd5a439
parent 47216 71c04702a3d5
child 49611 973c9504178e
--- a/src/hotspot/share/services/diagnosticCommand.hpp	Thu Feb 22 14:58:01 2018 -0500
+++ b/src/hotspot/share/services/diagnosticCommand.hpp	Thu Feb 22 14:16:18 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, 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
@@ -839,4 +839,25 @@
   virtual void execute(DCmdSource source, TRAPS);
 };
 
+class MetaspaceDCmd : public DCmd {
+public:
+  MetaspaceDCmd(outputStream* output, bool heap);
+  static const char* name() {
+    return "VM.metaspace";
+  }
+  static const char* description() {
+    return "Prints the statistics for the metaspace";
+  }
+  static const char* impact() {
+      return "Medium: Depends on number of classes loaded.";
+  }
+  static const JavaPermission permission() {
+    JavaPermission p = {"java.lang.management.ManagementPermission",
+                        "monitor", NULL};
+    return p;
+  }
+  static int num_arguments() { return 0; }
+  virtual void execute(DCmdSource source, TRAPS);
+};
+
 #endif // SHARE_VM_SERVICES_DIAGNOSTICCOMMAND_HPP