diff options
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 @@ | |||
10 | #include "util/header.h" | 10 | #include "util/header.h" |
11 | #include "util/session.h" | 11 | #include "util/session.h" |
12 | #include "util/tool.h" | 12 | #include "util/tool.h" |
13 | #include "util/cloexec.h" | ||
13 | 14 | ||
14 | #include "util/parse-options.h" | 15 | #include "util/parse-options.h" |
15 | #include "util/trace-event.h" | 16 | #include "util/trace-event.h" |
@@ -434,7 +435,8 @@ static int self_open_counters(void) | |||
434 | attr.type = PERF_TYPE_SOFTWARE; | 435 | attr.type = PERF_TYPE_SOFTWARE; |
435 | attr.config = PERF_COUNT_SW_TASK_CLOCK; | 436 | attr.config = PERF_COUNT_SW_TASK_CLOCK; |
436 | 437 | ||
437 | fd = sys_perf_event_open(&attr, 0, -1, -1, 0); | 438 | fd = sys_perf_event_open(&attr, 0, -1, -1, |
439 | perf_event_open_cloexec_flag()); | ||
438 | 440 | ||
439 | if (fd < 0) | 441 | if (fd < 0) |
440 | pr_err("Error: sys_perf_event_open() syscall returned " | 442 | pr_err("Error: sys_perf_event_open() syscall returned " |