Mercurial > hg > graal-compiler
comparison 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 |
comparison
equal
deleted
inserted
replaced
4754:66259eca2bf7 | 4773:4f25538b54c9 |
---|---|
224 arg = arg->next(); | 224 arg = arg->next(); |
225 } | 225 } |
226 } | 226 } |
227 | 227 |
228 void DCmdParser::print_help(outputStream* out, const char* cmd_name) { | 228 void DCmdParser::print_help(outputStream* out, const char* cmd_name) { |
229 out->print("\nSyntax : %s %s", cmd_name, _options == NULL ? "" : "[options]"); | 229 out->print("Syntax : %s %s", cmd_name, _options == NULL ? "" : "[options]"); |
230 GenDCmdArgument* arg = _arguments_list; | 230 GenDCmdArgument* arg = _arguments_list; |
231 while (arg != NULL) { | 231 while (arg != NULL) { |
232 if (arg->is_mandatory()) { | 232 if (arg->is_mandatory()) { |
233 out->print(" <%s>", arg->name()); | 233 out->print(" <%s>", arg->name()); |
234 } else { | 234 } else { |
371 command->execute(CHECK); | 371 command->execute(CHECK); |
372 } | 372 } |
373 } | 373 } |
374 } | 374 } |
375 | 375 |
376 void DCmdWithParser::parse(CmdLine* line, char delim, TRAPS) { | |
377 _dcmdparser.parse(line, delim, CHECK); | |
378 } | |
379 | |
380 void DCmdWithParser::print_help(const char* name) { | |
381 _dcmdparser.print_help(output(), name); | |
382 } | |
383 | |
384 void DCmdWithParser::reset(TRAPS) { | |
385 _dcmdparser.reset(CHECK); | |
386 } | |
387 | |
388 void DCmdWithParser::cleanup() { | |
389 _dcmdparser.cleanup(); | |
390 } | |
391 | |
392 GrowableArray<const char*>* DCmdWithParser::argument_name_array() { | |
393 return _dcmdparser.argument_name_array(); | |
394 } | |
395 | |
396 GrowableArray<DCmdArgumentInfo*>* DCmdWithParser::argument_info_array() { | |
397 return _dcmdparser.argument_info_array(); | |
398 } | |
399 | |
376 Mutex* DCmdFactory::_dcmdFactory_lock = new Mutex(Mutex::leaf, "DCmdFactory", true); | 400 Mutex* DCmdFactory::_dcmdFactory_lock = new Mutex(Mutex::leaf, "DCmdFactory", true); |
377 | 401 |
378 DCmdFactory* DCmdFactory::factory(const char* name, size_t len) { | 402 DCmdFactory* DCmdFactory::factory(const char* name, size_t len) { |
379 MutexLockerEx ml(_dcmdFactory_lock, Mutex::_no_safepoint_check_flag); | 403 MutexLockerEx ml(_dcmdFactory_lock, Mutex::_no_safepoint_check_flag); |
380 DCmdFactory* factory = _DCmdFactoryList; | 404 DCmdFactory* factory = _DCmdFactoryList; |