Mercurial > hg > truffle
diff src/share/vm/services/diagnosticFramework.cpp @ 4773:4f25538b54c9
7120511: Add diagnostic commands
Reviewed-by: acorn, phh, dcubed, sspitsyn
author | fparain |
---|---|
date | Mon, 09 Jan 2012 10:27:24 +0100 |
parents | 3b688d6ff3d0 |
children | f1cb6f9cfe21 |
line wrap: on
line diff
--- a/src/share/vm/services/diagnosticFramework.cpp Thu Jan 05 17:16:13 2012 -0500 +++ b/src/share/vm/services/diagnosticFramework.cpp Mon Jan 09 10:27:24 2012 +0100 @@ -226,7 +226,7 @@ } void DCmdParser::print_help(outputStream* out, const char* cmd_name) { - out->print("\nSyntax : %s %s", cmd_name, _options == NULL ? "" : "[options]"); + out->print("Syntax : %s %s", cmd_name, _options == NULL ? "" : "[options]"); GenDCmdArgument* arg = _arguments_list; while (arg != NULL) { if (arg->is_mandatory()) { @@ -373,6 +373,30 @@ } } +void DCmdWithParser::parse(CmdLine* line, char delim, TRAPS) { + _dcmdparser.parse(line, delim, CHECK); +} + +void DCmdWithParser::print_help(const char* name) { + _dcmdparser.print_help(output(), name); +} + +void DCmdWithParser::reset(TRAPS) { + _dcmdparser.reset(CHECK); +} + +void DCmdWithParser::cleanup() { + _dcmdparser.cleanup(); +} + +GrowableArray<const char*>* DCmdWithParser::argument_name_array() { + return _dcmdparser.argument_name_array(); +} + +GrowableArray<DCmdArgumentInfo*>* DCmdWithParser::argument_info_array() { + return _dcmdparser.argument_info_array(); +} + Mutex* DCmdFactory::_dcmdFactory_lock = new Mutex(Mutex::leaf, "DCmdFactory", true); DCmdFactory* DCmdFactory::factory(const char* name, size_t len) {