aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-stat.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2014-01-03 13:56:06 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-01-13 08:06:21 -0500
commit03ad9747c5f2169556467101e96bc390c5aa4b83 (patch)
treec60f2e8ad184a10ed493de0d6db07d2f03aae130 /tools/perf/builtin-stat.c
parent3e2be2da8f76ef5b2e8e59c3dc8acd24640b4af4 (diff)
perf evlist: Move destruction of maps to evlist destructor
Instead of requiring tools to do an extra destructor call just before calling perf_evlist__delete. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-0jd2ptzyikxb5wp7inzz2ah2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-stat.c')
-rw-r--r--tools/perf/builtin-stat.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index f8456cad656d..6ca076660de5 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1782,14 +1782,14 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
1782 if (interval && interval < 100) { 1782 if (interval && interval < 100) {
1783 pr_err("print interval must be >= 100ms\n"); 1783 pr_err("print interval must be >= 100ms\n");
1784 parse_options_usage(stat_usage, options, "I", 1); 1784 parse_options_usage(stat_usage, options, "I", 1);
1785 goto out_free_maps; 1785 goto out;
1786 } 1786 }
1787 1787
1788 if (perf_evlist__alloc_stats(evsel_list, interval)) 1788 if (perf_evlist__alloc_stats(evsel_list, interval))
1789 goto out_free_maps; 1789 goto out;
1790 1790
1791 if (perf_stat_init_aggr_mode()) 1791 if (perf_stat_init_aggr_mode())
1792 goto out_free_maps; 1792 goto out;
1793 1793
1794 /* 1794 /*
1795 * We dont want to block the signals - that would cause 1795 * We dont want to block the signals - that would cause
@@ -1821,8 +1821,6 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
1821 print_stat(argc, argv); 1821 print_stat(argc, argv);
1822 1822
1823 perf_evlist__free_stats(evsel_list); 1823 perf_evlist__free_stats(evsel_list);
1824out_free_maps:
1825 perf_evlist__delete_maps(evsel_list);
1826out: 1824out:
1827 perf_evlist__delete(evsel_list); 1825 perf_evlist__delete(evsel_list);
1828 return status; 1826 return status;