lkml.org 
[lkml]   [2014]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/4] perf tools: Fix CLOEXEC probe for perf_event_paranoid == 2
Date
With /proc/sys/kernel/perf_event_paranoid set to 2, the
probe of PERF_FLAG_FD_CLOEXEC would fail. Fix by excluding
kernel profiling from the probe event.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
tools/perf/util/cloexec.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/cloexec.c b/tools/perf/util/cloexec.c
index 5073c01..000047c 100644
--- a/tools/perf/util/cloexec.c
+++ b/tools/perf/util/cloexec.c
@@ -11,6 +11,7 @@ static int perf_flag_probe(void)
struct perf_event_attr attr = {
.type = PERF_TYPE_SOFTWARE,
.config = PERF_COUNT_SW_CPU_CLOCK,
+ .exclude_kernel = 1,
};
int fd;
int err;
--
1.8.3.2


\
 
 \ /
  Last update: 2014-08-12 17:21    [W:0.181 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site