zgu@3900: /* zgu@3900: * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. zgu@3900: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. zgu@3900: * zgu@3900: * This code is free software; you can redistribute it and/or modify it zgu@3900: * under the terms of the GNU General Public License version 2 only, as zgu@3900: * published by the Free Software Foundation. zgu@3900: * zgu@3900: * This code is distributed in the hope that it will be useful, but WITHOUT zgu@3900: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or zgu@3900: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License zgu@3900: * version 2 for more details (a copy is included in the LICENSE file that zgu@3900: * accompanied this code). zgu@3900: * zgu@3900: * You should have received a copy of the GNU General Public License version zgu@3900: * 2 along with this work; if not, write to the Free Software Foundation, zgu@3900: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. zgu@3900: * zgu@3900: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA zgu@3900: * or visit www.oracle.com if you need additional information or have any zgu@3900: * questions. zgu@3900: * zgu@3900: */ zgu@3900: zgu@3900: #ifndef SHARE_VM_SERVICES_NMT_DCMD_HPP zgu@3900: #define SHARE_VM_SERVICES_NMT_DCMD_HPP zgu@3900: zgu@3900: #include "services/diagnosticArgument.hpp" zgu@3900: #include "services/diagnosticFramework.hpp" zgu@3900: zgu@3900: /** zgu@3900: * Native memory tracking DCmd implementation zgu@3900: */ zgu@3900: class NMTDCmd: public DCmdWithParser { zgu@3900: protected: zgu@3900: DCmdArgument _summary; zgu@3900: DCmdArgument _detail; zgu@3900: DCmdArgument _baseline; zgu@3900: DCmdArgument _summary_diff; zgu@3900: DCmdArgument _detail_diff; zgu@3900: DCmdArgument _shutdown; zgu@3900: #ifndef PRODUCT zgu@3900: DCmdArgument _debug; zgu@3900: #endif zgu@3900: DCmdArgument _scale; zgu@3900: zgu@3900: public: zgu@3900: NMTDCmd(outputStream* output, bool heap); zgu@3900: static const char* name() { return "VM.native_memory"; } zgu@3900: static const char* description() { zgu@3900: return "Print native memory usage"; zgu@3900: } zgu@3900: static const char* impact() { zgu@3900: return "Medium:"; zgu@3900: } zgu@3900: static int num_arguments(); zgu@3900: virtual void execute(TRAPS); zgu@3900: }; zgu@3900: zgu@3900: #endif // SHARE_VM_SERVICES_NMT_DCMD_HPP