OSDN Git Service

Merge "Pagecache.py fixes and updates."
[android-x86/system-extras.git] / simpleperf / cmd_help.cpp
index 75df732..a29ef72 100644 (file)
@@ -18,7 +18,7 @@
 #include <string>
 #include <vector>
 
-#include <base/logging.h>
+#include <android-base/logging.h>
 
 #include "command.h"
 
@@ -55,10 +55,16 @@ bool HelpCommand::Run(const std::vector<std::string>& args) {
 }
 
 void HelpCommand::PrintShortHelp() {
-  printf("Usage: simpleperf [--help] subcommand [args_for_subcommand]\n\n");
+  printf(
+      "Usage: simpleperf [common options] subcommand [args_for_subcommand]\n"
+      "common options:\n"
+      "    -h/--help     Print this help information.\n"
+      "    --log <severity> Set the minimum severity of logging. Possible severities\n"
+      "                     include debug, warning, error, fatal. Default is warning.\n"
+      "subcommands:\n");
   for (auto& cmd_name : GetAllCommandNames()) {
     std::unique_ptr<Command> cmd = CreateCommandInstance(cmd_name);
-    printf("%-20s%s\n", cmd_name.c_str(), cmd->ShortHelpString().c_str());
+    printf("    %-20s%s\n", cmd_name.c_str(), cmd->ShortHelpString().c_str());
   }
 }