trace: format the usage output

before:
Usage: trace <subcommand>...
Subcommand:
  start [-c][<duration>]          : Start task tracing
  stop                            : Stop task tracing
  dump [-a][-c][<filename>]           : Output the trace result
 [-a] <Android SysTrace>
  mode [{+|-}{o|w|s|a|i|d}...]        : Set task trace options
  switch [+|-] : Configure switch trace filter
  syscall [{+|-}<syscallname>...] : Configure syscall trace filter
  irq [{+|-}<irqnum>...]          : Configure IRQ trace filter
  print [+|-] : Configure dump tnsh>

after:
Usage: trace <subcommand>...
Subcommand:
 start   [-c][<duration>]            : Start task tracing
 stop                                : Stop task tracing
 cmd     [-c] <command> [<args>...]  : Get the trace while running <command>
 dump    [-a][-c][<filename>]        : Output the trace result
                                       [-a] <Android SysTrace>
 mode    [{+|-}{o|w|s|a|i|d}...]     : Set task trace options
 switch  [+|-]                       : Configure switch trace filter
 syscall [{+|-}<syscallname>...]     : Configure syscall trace filter
 irq     [{+|-}<irqnum>...]          : Configure IRQ trace filter
 print   [+|-]                       : Configure dump trace filter

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an 2022-05-09 12:28:16 +08:00 committed by Xiang Xiao
parent 089c05cbd8
commit 725fe76b91

View file

@ -787,38 +787,40 @@ static void show_usage(void)
fprintf(stderr,
"\nUsage: trace <subcommand>...\n"
"Subcommand:\n"
" start [-c][<duration>] :"
" start [-c][<duration>] :"
" Start task tracing\n"
" stop :"
" stop :"
" Stop task tracing\n"
#ifdef CONFIG_SYSTEM_SYSTEM
" cmd [-c] <command> [<args>...] :"
" cmd [-c] <command> [<args>...] :"
" Get the trace while running <command>\n"
#endif
#ifdef CONFIG_DRIVER_NOTERAM
" dump [-a][-c][<filename>] :"
" dump [-a][-c][<filename>] :"
" Output the trace result\n"
" [-a] <Android SysTrace>\n"
" [-a] <Android SysTrace>\n"
#endif
" mode [{+|-}{o|w|s|a|i|d}...] :"
" mode [{+|-}{o|w|s|a|i|d}...] :"
" Set task trace options\n"
#ifdef CONFIG_SCHED_INSTRUMENTATION_SWITCH
" switch [+|-] :"
" switch [+|-] :"
" Configure switch trace filter\n"
#endif
#ifdef CONFIG_SCHED_INSTRUMENTATION_SYSCALL
" syscall [{+|-}<syscallname>...] :"
" syscall [{+|-}<syscallname>...] :"
" Configure syscall trace filter\n"
#endif
#ifdef CONFIG_SCHED_INSTRUMENTATION_IRQHANDLER
" irq [{+|-}<irqnum>...] :"
" irq [{+|-}<irqnum>...] :"
" Configure IRQ trace filter\n"
#endif
#ifdef CONFIG_SCHED_INSTRUMENTATION_DUMP
" print [+|-] :"
" print [+|-] :"
" Configure dump trace filter\n"
#endif
);
fflush(stderr);
}
/****************************************************************************