Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/share/vm/services/nmtDCmd.hpp
32285 views
/*1* Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#ifndef SHARE_VM_SERVICES_NMT_DCMD_HPP25#define SHARE_VM_SERVICES_NMT_DCMD_HPP2627#if INCLUDE_NMT2829#include "services/diagnosticArgument.hpp"30#include "services/diagnosticFramework.hpp"31#include "services/memBaseline.hpp"32#include "services/mallocTracker.hpp"3334/**35* Native memory tracking DCmd implementation36*/37class NMTDCmd: public DCmdWithParser {38protected:39DCmdArgument<bool> _summary;40DCmdArgument<bool> _detail;41DCmdArgument<bool> _baseline;42DCmdArgument<bool> _summary_diff;43DCmdArgument<bool> _detail_diff;44DCmdArgument<bool> _shutdown;45DCmdArgument<bool> _statistics;46DCmdArgument<char*> _scale;4748public:49NMTDCmd(outputStream* output, bool heap);50static const char* name() { return "VM.native_memory"; }51static const char* description() {52return "Print native memory usage";53}54static const char* impact() {55return "Medium";56}57static const JavaPermission permission() {58JavaPermission p = {"java.lang.management.ManagementPermission",59"monitor", NULL};60return p;61}62static int num_arguments();63virtual void execute(DCmdSource source, TRAPS);6465private:66void report(bool summaryOnly, size_t scale);67void report_diff(bool summaryOnly, size_t scale);6869size_t get_scale(const char* scale) const;7071// check if NMT running at detail tracking level72bool check_detail_tracking_level(outputStream* out);73};7475#endif // INCLUDE_NMT7677#endif // SHARE_VM_SERVICES_NMT_DCMD_HPP787980