summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2014-01-03 16:54:12 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-01-13 10:06:22 -0300
commitf26e1c7cb279051d83e0b671f48b30fe88c2c788 (patch)
tree9f580f4038fdcd9b55ad168bcd7fe864262637ce /tools/perf/builtin-record.c
parent03ad9747c5f2169556467101e96bc390c5aa4b83 (diff)
downloadop-kernel-dev-f26e1c7cb279051d83e0b671f48b30fe88c2c788.zip
op-kernel-dev-f26e1c7cb279051d83e0b671f48b30fe88c2c788.tar.gz
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/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 5149b41..b7f5e43 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -970,7 +970,6 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
err = __cmd_record(&record, argc, argv);
perf_evlist__munmap(rec->evlist);
- perf_evlist__close(rec->evlist);
out_symbol_exit:
symbol__exit();
return err;
OpenPOWER on IntegriCloud