diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-01-03 13:56:06 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-01-13 08:06:21 -0500 |
commit | 03ad9747c5f2169556467101e96bc390c5aa4b83 (patch) | |
tree | c60f2e8ad184a10ed493de0d6db07d2f03aae130 /tools/perf/builtin-trace.c | |
parent | 3e2be2da8f76ef5b2e8e59c3dc8acd24640b4af4 (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-trace.c')
-rw-r--r-- | tools/perf/builtin-trace.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 5498eacf8fc6..f4ddd14b8a9b 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -1885,7 +1885,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv) | |||
1885 | err = trace__symbols_init(trace, evlist); | 1885 | err = trace__symbols_init(trace, evlist); |
1886 | if (err < 0) { | 1886 | if (err < 0) { |
1887 | fprintf(trace->output, "Problems initializing symbol libraries!\n"); | 1887 | fprintf(trace->output, "Problems initializing symbol libraries!\n"); |
1888 | goto out_delete_maps; | 1888 | goto out_delete_evlist; |
1889 | } | 1889 | } |
1890 | 1890 | ||
1891 | perf_evlist__config(evlist, &trace->opts); | 1891 | perf_evlist__config(evlist, &trace->opts); |
@@ -1898,7 +1898,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv) | |||
1898 | argv, false, NULL); | 1898 | argv, false, NULL); |
1899 | if (err < 0) { | 1899 | if (err < 0) { |
1900 | fprintf(trace->output, "Couldn't run the workload!\n"); | 1900 | fprintf(trace->output, "Couldn't run the workload!\n"); |
1901 | goto out_delete_maps; | 1901 | goto out_delete_evlist; |
1902 | } | 1902 | } |
1903 | } | 1903 | } |
1904 | 1904 | ||
@@ -1996,8 +1996,6 @@ out_disable: | |||
1996 | perf_evlist__munmap(evlist); | 1996 | perf_evlist__munmap(evlist); |
1997 | out_close_evlist: | 1997 | out_close_evlist: |
1998 | perf_evlist__close(evlist); | 1998 | perf_evlist__close(evlist); |
1999 | out_delete_maps: | ||
2000 | perf_evlist__delete_maps(evlist); | ||
2001 | out_delete_evlist: | 1999 | out_delete_evlist: |
2002 | perf_evlist__delete(evlist); | 2000 | perf_evlist__delete(evlist); |
2003 | out: | 2001 | out: |