perf list: Add a --no-desc flag
Add a --no-desc flag to 'perf list' to not print the event descriptions that were earlier added for JSON events. This may be useful to get a less crowded listing. It's still default to print descriptions as that is the more useful default for most users. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Acked-by: Ingo Molnar <mingo@kernel.org> Acked-by: Jiri Olsa <jolsa@redhat.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: linuxppc-dev@lists.ozlabs.org Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1473978296-20712-9-git-send-email-sukadev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
61eb2eb434
commit
1c5f01fe86
@@ -1084,7 +1084,7 @@ static void wordwrap(char *s, int start, int max, int corr)
|
||||
}
|
||||
}
|
||||
|
||||
void print_pmu_events(const char *event_glob, bool name_only)
|
||||
void print_pmu_events(const char *event_glob, bool name_only, bool quiet_flag)
|
||||
{
|
||||
struct perf_pmu *pmu;
|
||||
struct perf_pmu_alias *alias;
|
||||
@@ -1151,7 +1151,7 @@ void print_pmu_events(const char *event_glob, bool name_only)
|
||||
printf("%s ", aliases[j].name);
|
||||
continue;
|
||||
}
|
||||
if (aliases[j].desc) {
|
||||
if (aliases[j].desc && !quiet_flag) {
|
||||
if (numdesc++ == 0)
|
||||
printf("\n");
|
||||
printf(" %-50s\n", aliases[j].name);
|
||||
|
Reference in New Issue
Block a user