|
19 | 19 | #include "util/string2.h"
|
20 | 20 | #include "util/strlist.h"
|
21 | 21 | #include "util/strbuf.h"
|
| 22 | +#include "util/tool_pmu.h" |
22 | 23 | #include <subcmd/pager.h>
|
23 | 24 | #include <subcmd/parse-options.h>
|
24 | 25 | #include <linux/zalloc.h>
|
@@ -614,9 +615,18 @@ int cmd_list(int argc, const char **argv)
|
614 | 615 | event_symbols_hw, PERF_COUNT_HW_MAX);
|
615 | 616 | else if (strcmp(argv[i], "sw") == 0 ||
|
616 | 617 | strcmp(argv[i], "software") == 0) {
|
| 618 | + char *old_pmu_glob = default_ps.pmu_glob; |
| 619 | + |
617 | 620 | print_symbol_events(&print_cb, ps, PERF_TYPE_SOFTWARE,
|
618 | 621 | event_symbols_sw, PERF_COUNT_SW_MAX);
|
619 |
| - print_tool_events(&print_cb, ps); |
| 622 | + default_ps.pmu_glob = strdup("tool"); |
| 623 | + if (!default_ps.pmu_glob) { |
| 624 | + ret = -1; |
| 625 | + goto out; |
| 626 | + } |
| 627 | + perf_pmus__print_pmu_events(&print_cb, ps); |
| 628 | + zfree(&default_ps.pmu_glob); |
| 629 | + default_ps.pmu_glob = old_pmu_glob; |
620 | 630 | } else if (strcmp(argv[i], "cache") == 0 ||
|
621 | 631 | strcmp(argv[i], "hwcache") == 0)
|
622 | 632 | print_hwcache_events(&print_cb, ps);
|
@@ -664,7 +674,6 @@ int cmd_list(int argc, const char **argv)
|
664 | 674 | event_symbols_hw, PERF_COUNT_HW_MAX);
|
665 | 675 | print_symbol_events(&print_cb, ps, PERF_TYPE_SOFTWARE,
|
666 | 676 | event_symbols_sw, PERF_COUNT_SW_MAX);
|
667 |
| - print_tool_events(&print_cb, ps); |
668 | 677 | print_hwcache_events(&print_cb, ps);
|
669 | 678 | perf_pmus__print_pmu_events(&print_cb, ps);
|
670 | 679 | print_tracepoint_events(&print_cb, ps);
|
|
0 commit comments