diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-01-03 14:54:12 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-01-13 08:06:22 -0500 |
commit | f26e1c7cb279051d83e0b671f48b30fe88c2c788 (patch) | |
tree | 9f580f4038fdcd9b55ad168bcd7fe864262637ce /tools/perf/tests/code-reading.c | |
parent | 03ad9747c5f2169556467101e96bc390c5aa4b83 (diff) |
perf evlist: Close fds on destructor
Since it is safe to call perf_evlist__close() multiple times, autoclose
it and remove the calls to the close from existing tools, reducing the
tooling boilerplate.
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-2kq9v7p1rude1tqxa0aue2tk@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/code-reading.c')
-rw-r--r-- | tools/perf/tests/code-reading.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c index ddbc7756620c..2c0ce723749f 100644 --- a/tools/perf/tests/code-reading.c +++ b/tools/perf/tests/code-reading.c | |||
@@ -541,7 +541,6 @@ static int do_test_code_reading(bool try_kcore) | |||
541 | out_err: | 541 | out_err: |
542 | if (evlist) { | 542 | if (evlist) { |
543 | perf_evlist__munmap(evlist); | 543 | perf_evlist__munmap(evlist); |
544 | perf_evlist__close(evlist); | ||
545 | perf_evlist__delete(evlist); | 544 | perf_evlist__delete(evlist); |
546 | } else { | 545 | } else { |
547 | cpu_map__delete(cpus); | 546 | cpu_map__delete(cpus); |