diff options
Diffstat (limited to 'tools/perf/builtin-list.c')
| -rw-r--r-- | tools/perf/builtin-list.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c index 6313b6eb3ebb..1948eceb517a 100644 --- a/tools/perf/builtin-list.c +++ b/tools/perf/builtin-list.c | |||
| @@ -14,20 +14,20 @@ | |||
| 14 | #include "util/parse-events.h" | 14 | #include "util/parse-events.h" |
| 15 | #include "util/cache.h" | 15 | #include "util/cache.h" |
| 16 | 16 | ||
| 17 | int cmd_list(int argc, const char **argv, const char *prefix __used) | 17 | int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused) |
| 18 | { | 18 | { |
| 19 | setup_pager(); | 19 | setup_pager(); |
| 20 | 20 | ||
| 21 | if (argc == 1) | 21 | if (argc == 1) |
| 22 | print_events(NULL); | 22 | print_events(NULL, false); |
| 23 | else { | 23 | else { |
| 24 | int i; | 24 | int i; |
| 25 | 25 | ||
| 26 | for (i = 1; i < argc; ++i) { | 26 | for (i = 1; i < argc; ++i) { |
| 27 | if (i > 1) | 27 | if (i > 2) |
| 28 | putchar('\n'); | 28 | putchar('\n'); |
| 29 | if (strncmp(argv[i], "tracepoint", 10) == 0) | 29 | if (strncmp(argv[i], "tracepoint", 10) == 0) |
| 30 | print_tracepoint_events(NULL, NULL); | 30 | print_tracepoint_events(NULL, NULL, false); |
| 31 | else if (strcmp(argv[i], "hw") == 0 || | 31 | else if (strcmp(argv[i], "hw") == 0 || |
| 32 | strcmp(argv[i], "hardware") == 0) | 32 | strcmp(argv[i], "hardware") == 0) |
| 33 | print_events_type(PERF_TYPE_HARDWARE); | 33 | print_events_type(PERF_TYPE_HARDWARE); |
| @@ -36,13 +36,15 @@ int cmd_list(int argc, const char **argv, const char *prefix __used) | |||
| 36 | print_events_type(PERF_TYPE_SOFTWARE); | 36 | print_events_type(PERF_TYPE_SOFTWARE); |
| 37 | else if (strcmp(argv[i], "cache") == 0 || | 37 | else if (strcmp(argv[i], "cache") == 0 || |
| 38 | strcmp(argv[i], "hwcache") == 0) | 38 | strcmp(argv[i], "hwcache") == 0) |
| 39 | print_hwcache_events(NULL); | 39 | print_hwcache_events(NULL, false); |
| 40 | else if (strcmp(argv[i], "--raw-dump") == 0) | ||
| 41 | print_events(NULL, true); | ||
| 40 | else { | 42 | else { |
| 41 | char *sep = strchr(argv[i], ':'), *s; | 43 | char *sep = strchr(argv[i], ':'), *s; |
| 42 | int sep_idx; | 44 | int sep_idx; |
| 43 | 45 | ||
| 44 | if (sep == NULL) { | 46 | if (sep == NULL) { |
| 45 | print_events(argv[i]); | 47 | print_events(argv[i], false); |
| 46 | continue; | 48 | continue; |
| 47 | } | 49 | } |
| 48 | sep_idx = sep - argv[i]; | 50 | sep_idx = sep - argv[i]; |
| @@ -51,7 +53,7 @@ int cmd_list(int argc, const char **argv, const char *prefix __used) | |||
| 51 | return -1; | 53 | return -1; |
| 52 | 54 | ||
| 53 | s[sep_idx] = '\0'; | 55 | s[sep_idx] = '\0'; |
| 54 | print_tracepoint_events(s, s + sep_idx + 1); | 56 | print_tracepoint_events(s, s + sep_idx + 1, false); |
| 55 | free(s); | 57 | free(s); |
| 56 | } | 58 | } |
| 57 | } | 59 | } |
