diff options
Diffstat (limited to 'tools/perf/builtin-stat.c')
-rw-r--r-- | tools/perf/builtin-stat.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 02b2d8013a61..0ff11d9b13be 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c | |||
@@ -316,6 +316,8 @@ static int run_perf_stat(int argc __used, const char **argv) | |||
316 | "\t Consider tweaking" | 316 | "\t Consider tweaking" |
317 | " /proc/sys/kernel/perf_event_paranoid or running as root.", | 317 | " /proc/sys/kernel/perf_event_paranoid or running as root.", |
318 | system_wide ? "system-wide " : ""); | 318 | system_wide ? "system-wide " : ""); |
319 | } else if (errno == ENOENT) { | ||
320 | error("%s event is not supported. ", event_name(counter)); | ||
319 | } else { | 321 | } else { |
320 | error("open_counter returned with %d (%s). " | 322 | error("open_counter returned with %d (%s). " |
321 | "/bin/dmesg may provide additional information.\n", | 323 | "/bin/dmesg may provide additional information.\n", |
@@ -683,8 +685,7 @@ int cmd_stat(int argc, const char **argv, const char *prefix __used) | |||
683 | nr_counters = ARRAY_SIZE(default_attrs); | 685 | nr_counters = ARRAY_SIZE(default_attrs); |
684 | 686 | ||
685 | for (c = 0; c < ARRAY_SIZE(default_attrs); ++c) { | 687 | for (c = 0; c < ARRAY_SIZE(default_attrs); ++c) { |
686 | pos = perf_evsel__new(default_attrs[c].type, | 688 | pos = perf_evsel__new(&default_attrs[c], |
687 | default_attrs[c].config, | ||
688 | nr_counters); | 689 | nr_counters); |
689 | if (pos == NULL) | 690 | if (pos == NULL) |
690 | goto out; | 691 | goto out; |
@@ -742,6 +743,7 @@ int cmd_stat(int argc, const char **argv, const char *prefix __used) | |||
742 | out_free_fd: | 743 | out_free_fd: |
743 | list_for_each_entry(pos, &evsel_list, node) | 744 | list_for_each_entry(pos, &evsel_list, node) |
744 | perf_evsel__free_stat_priv(pos); | 745 | perf_evsel__free_stat_priv(pos); |
746 | perf_evsel_list__delete(); | ||
745 | out: | 747 | out: |
746 | thread_map__delete(threads); | 748 | thread_map__delete(threads); |
747 | threads = NULL; | 749 | threads = NULL; |