Blame SOURCES/oprofile-captest.patch

c532ac
diff --git a/libpe_utils/op_pe_utils.cpp b/libpe_utils/op_pe_utils.cpp
c532ac
index c5b6ee7..0550fa7 100644
c532ac
--- a/libpe_utils/op_pe_utils.cpp
c532ac
+++ b/libpe_utils/op_pe_utils.cpp
c532ac
@@ -174,6 +174,8 @@ int op_pe_utils::op_check_perf_events_cap(bool use_cpu_minus_one)
c532ac
         memset(&attr, 0, sizeof(attr));
c532ac
         attr.size = sizeof(attr);
c532ac
         attr.sample_type = PERF_SAMPLE_IP;
c532ac
+	/* avoid kernel events so test works when perf_event_paranoid = 2 */
c532ac
+	attr.exclude_kernel =1;
c532ac
 
c532ac
 	pid = getpid();
c532ac
 	syscall(__NR_perf_event_open, &attr, pid, cpu_to_try, -1, 0);