1 /*
2 * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
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_DIAGNOSTICCOMMAND_HPP
26 #define SHARE_VM_SERVICES_DIAGNOSTICCOMMAND_HPP
27
28 #include "runtime/arguments.hpp"
29 #include "classfile/vmSymbols.hpp"
30 #include "utilities/ostream.hpp"
31 #include "runtime/vm_version.hpp"
32 #include "runtime/vmThread.hpp"
33 #include "runtime/os.hpp"
34 #include "services/diagnosticArgument.hpp"
35 #include "services/diagnosticCommand.hpp"
36 #include "services/diagnosticFramework.hpp"
37 #include "services/diagnosticCommand_ext.hpp"
38 #include "utilities/macros.hpp"
39
40 class HelpDCmd : public DCmdWithParser {
41 protected:
42 DCmdArgument<bool> _all;
43 DCmdArgument<char*> _cmd;
44 public:
45 HelpDCmd(outputStream* output, bool heap);
46 static const char* name() { return "help"; }
47 static const char* description() {
48 return "For more information about a specific command use 'help <command>'. "
49 "With no argument this will show a list of available commands. "
50 "'help all' will show help for all commands.";
51 }
52 static const char* impact() { return "Low"; }
53 static int num_arguments();
54 virtual void execute(DCmdSource source, TRAPS);
55 };
56
57 class VersionDCmd : public DCmd {
58 public:
|
1 /*
2 * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
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_DIAGNOSTICCOMMAND_HPP
26 #define SHARE_VM_SERVICES_DIAGNOSTICCOMMAND_HPP
27
28 #include "classfile/vmSymbols.hpp"
29 #include "runtime/arguments.hpp"
30 #include "runtime/os.hpp"
31 #include "runtime/vmThread.hpp"
32 #include "services/diagnosticArgument.hpp"
33 #include "services/diagnosticCommand.hpp"
34 #include "services/diagnosticCommand_ext.hpp"
35 #include "services/diagnosticFramework.hpp"
36 #include "utilities/macros.hpp"
37 #include "utilities/ostream.hpp"
38
39 class HelpDCmd : public DCmdWithParser {
40 protected:
41 DCmdArgument<bool> _all;
42 DCmdArgument<char*> _cmd;
43 public:
44 HelpDCmd(outputStream* output, bool heap);
45 static const char* name() { return "help"; }
46 static const char* description() {
47 return "For more information about a specific command use 'help <command>'. "
48 "With no argument this will show a list of available commands. "
49 "'help all' will show help for all commands.";
50 }
51 static const char* impact() { return "Low"; }
52 static int num_arguments();
53 virtual void execute(DCmdSource source, TRAPS);
54 };
55
56 class VersionDCmd : public DCmd {
57 public:
|