diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-07-18 12:19:20 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-07-18 12:19:20 +0200 |
commit | 2336ebc32676df5b794acfe0c980583ec6c05f34 (patch) | |
tree | 1959b68ad8750d42f7fe5f3cefad910c97061e66 /tools/perf/builtin-sched.c | |
parent | ec6dbcb7ade2a616675cbe3185cf299ee1615c9f (diff) | |
parent | fb578179a54553716afb0666a4d8c194acd313ba (diff) | |
download | talos-op-linux-2336ebc32676df5b794acfe0c980583ec6c05f34.tar.gz talos-op-linux-2336ebc32676df5b794acfe0c980583ec6c05f34.zip |
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/core
Pull perf/core improvements and fixes from Jiri Olsa:
. Update attr test with PERF_FLAG_FD_CLOEXEC flag (Jiri Olsa)
. Enable close-on-exec flag on perf file descriptor (Yann Droneaud)
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/builtin-sched.c')
-rw-r--r-- | tools/perf/builtin-sched.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index b7f555add0c8..f83c08c0dd87 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c @@ -10,6 +10,7 @@ #include "util/header.h" #include "util/session.h" #include "util/tool.h" +#include "util/cloexec.h" #include "util/parse-options.h" #include "util/trace-event.h" @@ -434,7 +435,8 @@ static int self_open_counters(void) attr.type = PERF_TYPE_SOFTWARE; attr.config = PERF_COUNT_SW_TASK_CLOCK; - fd = sys_perf_event_open(&attr, 0, -1, -1, 0); + fd = sys_perf_event_open(&attr, 0, -1, -1, + perf_event_open_cloexec_flag()); if (fd < 0) pr_err("Error: sys_perf_event_open() syscall returned " |