Mercurial > hg > truffle
annotate src/share/vm/services/nmtDCmd.hpp @ 21231:0bb06deee33b
Check for null in LabelOp#setIncomingValues and JumpOp#setOutgoingValues.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Tue, 05 May 2015 12:12:33 +0200 |
parents | 833b0f92429a |
children |
rev | line source |
---|---|
6197 | 1 /* |
20360 | 2 * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. |
6197 | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
20 * or visit www.oracle.com if you need additional information or have any | |
21 * questions. | |
22 * | |
23 */ | |
24 | |
25 #ifndef SHARE_VM_SERVICES_NMT_DCMD_HPP | |
26 #define SHARE_VM_SERVICES_NMT_DCMD_HPP | |
27 | |
20360 | 28 #if INCLUDE_NMT |
29 | |
6197 | 30 #include "services/diagnosticArgument.hpp" |
31 #include "services/diagnosticFramework.hpp" | |
20360 | 32 #include "services/memBaseline.hpp" |
33 #include "services/mallocTracker.hpp" | |
6197 | 34 |
35 /** | |
36 * Native memory tracking DCmd implementation | |
37 */ | |
38 class NMTDCmd: public DCmdWithParser { | |
39 protected: | |
40 DCmdArgument<bool> _summary; | |
41 DCmdArgument<bool> _detail; | |
42 DCmdArgument<bool> _baseline; | |
43 DCmdArgument<bool> _summary_diff; | |
44 DCmdArgument<bool> _detail_diff; | |
45 DCmdArgument<bool> _shutdown; | |
20360 | 46 DCmdArgument<bool> _statistics; |
6197 | 47 DCmdArgument<char*> _scale; |
48 | |
49 public: | |
50 NMTDCmd(outputStream* output, bool heap); | |
51 static const char* name() { return "VM.native_memory"; } | |
52 static const char* description() { | |
53 return "Print native memory usage"; | |
54 } | |
55 static const char* impact() { | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8810
diff
changeset
|
56 return "Medium"; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8810
diff
changeset
|
57 } |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8810
diff
changeset
|
58 static const JavaPermission permission() { |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8810
diff
changeset
|
59 JavaPermission p = {"java.lang.management.ManagementPermission", |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8810
diff
changeset
|
60 "monitor", NULL}; |
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8810
diff
changeset
|
61 return p; |
6197 | 62 } |
63 static int num_arguments(); | |
10215
31a4e55f8c9d
8004095: Add support for JMX interface to Diagnostic Framework and Commands
fparain
parents:
8810
diff
changeset
|
64 virtual void execute(DCmdSource source, TRAPS); |
20360 | 65 |
66 private: | |
67 void report(bool summaryOnly, size_t scale); | |
68 void report_diff(bool summaryOnly, size_t scale); | |
69 | |
70 size_t get_scale(const char* scale) const; | |
71 | |
72 // check if NMT running at detail tracking level | |
73 bool check_detail_tracking_level(outputStream* out); | |
6197 | 74 }; |
75 | |
20360 | 76 #endif // INCLUDE_NMT |
77 | |
6197 | 78 #endif // SHARE_VM_SERVICES_NMT_DCMD_HPP |