--- v20
+++ v13
@@ -9,24 +9,19 @@
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
-Acked-by: Jiri Olsa <jolsa@redhat.com>
----
v2: Rename --quiet to --no-desc. Add option to man page.
-
-v18: Fix minor conflict in tools/perf/builtin-list.c; Add !desc_flag
- to the newly introduced print_pmu_events() call site.
---
- tools/perf/Documentation/perf-list.txt | 8 +++++++-
- tools/perf/builtin-list.c | 14 +++++++++-----
- tools/perf/util/parse-events.c | 4 ++--
- tools/perf/util/parse-events.h | 2 +-
- tools/perf/util/pmu.c | 4 ++--
- tools/perf/util/pmu.h | 2 +-
- 6 files changed, 22 insertions(+), 12 deletions(-)
+ tools/perf/Documentation/perf-list.txt | 8 +++++++-
+ tools/perf/builtin-list.c | 12 ++++++++----
+ tools/perf/util/parse-events.c | 4 ++--
+ tools/perf/util/parse-events.h | 2 +-
+ tools/perf/util/pmu.c | 4 ++--
+ tools/perf/util/pmu.h | 2 +-
+ 6 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/tools/perf/Documentation/perf-list.txt b/tools/perf/Documentation/perf-list.txt
-index a126e97..72209bc 100644
+index bada893..9507552 100644
--- a/tools/perf/Documentation/perf-list.txt
+++ b/tools/perf/Documentation/perf-list.txt
@@ -8,13 +8,19 @@ perf-list - List all symbolic event types
@@ -51,12 +46,12 @@
EVENT MODIFIERS
---------------
diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
-index 5e22db4..6be195b 100644
+index af5bd05..3f058f7 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -16,16 +16,20 @@
#include "util/pmu.h"
- #include <subcmd/parse-options.h>
+ #include "util/parse-options.h"
+static bool desc_flag = true;
+
@@ -85,13 +80,14 @@
return 0;
}
-@@ -61,12 +65,12 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
+@@ -59,13 +63,13 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
strcmp(argv[i], "hwcache") == 0)
print_hwcache_events(NULL, raw_dump);
else if (strcmp(argv[i], "pmu") == 0)
- print_pmu_events(NULL, raw_dump);
+ print_pmu_events(NULL, raw_dump, !desc_flag);
- else if ((sep = strchr(argv[i], ':')) != NULL) {
+ else {
+ char *sep = strchr(argv[i], ':'), *s;
int sep_idx;
if (sep == NULL) {
@@ -100,20 +96,11 @@
continue;
}
sep_idx = sep - argv[i];
-@@ -87,7 +91,7 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
- print_symbol_events(s, PERF_TYPE_SOFTWARE,
- event_symbols_sw, PERF_COUNT_SW_MAX, raw_dump);
- print_hwcache_events(s, raw_dump);
-- print_pmu_events(s, raw_dump);
-+ print_pmu_events(s, raw_dump, !desc_flag);
- print_tracepoint_events(NULL, s, raw_dump);
- free(s);
- }
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
-index d15e335..72803e3 100644
+index 2a4d1ec..65f7572 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
-@@ -2133,7 +2133,7 @@ out_enomem:
+@@ -1521,7 +1521,7 @@ out_enomem:
/*
* Print the help text for the event symbols:
*/
@@ -122,7 +109,7 @@
{
print_symbol_events(event_glob, PERF_TYPE_HARDWARE,
event_symbols_hw, PERF_COUNT_HW_MAX, name_only);
-@@ -2143,7 +2143,7 @@ void print_events(const char *event_glob, bool name_only)
+@@ -1531,7 +1531,7 @@ void print_events(const char *event_glob, bool name_only)
print_hwcache_events(event_glob, name_only);
@@ -132,10 +119,10 @@
if (event_glob != NULL)
return;
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
-index 46c05cc..dee5022 100644
+index 131f29b..d11f854 100644
--- a/tools/perf/util/parse-events.h
+++ b/tools/perf/util/parse-events.h
-@@ -169,7 +169,7 @@ void parse_events_update_lists(struct list_head *list_event,
+@@ -133,7 +133,7 @@ void parse_events_update_lists(struct list_head *list_event,
void parse_events_evlist_error(struct parse_events_evlist *data,
int idx, const char *str);
@@ -145,10 +132,10 @@
struct event_symbol {
const char *symbol;
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
-index 10a95e7..fe1dec3 100644
+index 77e0500..417333b 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
-@@ -1076,7 +1076,7 @@ static void wordwrap(char *s, int start, int max, int corr)
+@@ -1029,7 +1029,7 @@ static void wordwrap(char *s, int start, int max, int corr)
}
}
@@ -157,7 +144,7 @@
{
struct perf_pmu *pmu;
struct perf_pmu_alias *alias;
-@@ -1143,7 +1143,7 @@ void print_pmu_events(const char *event_glob, bool name_only)
+@@ -1092,7 +1092,7 @@ void print_pmu_events(const char *event_glob, bool name_only)
printf("%s ", aliases[j].name);
continue;
}
@@ -167,10 +154,10 @@
printf("\n");
printf(" %-50s\n", aliases[j].name);
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
-index 11bda57..42999c7 100644
+index e7b1010..9966c1a 100644
--- a/tools/perf/util/pmu.h
+++ b/tools/perf/util/pmu.h
-@@ -70,7 +70,7 @@ int perf_pmu__format_parse(char *dir, struct list_head *head);
+@@ -69,7 +69,7 @@ int perf_pmu__format_parse(char *dir, struct list_head *head);
struct perf_pmu *perf_pmu__scan(struct perf_pmu *pmu);
@@ -180,4 +167,4 @@
int perf_pmu__scan_file(struct perf_pmu *pmu, const char *name, const char *fmt,
--
-2.5.3
+1.7.9.5