From: Jiri Olsa Date: Sun, 3 Aug 2014 12:10:36 +0000 (+0200) Subject: perf tools: Fix PERF_FLAG_FD_CLOEXEC flag probing event type open counters due to... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=038fa0b9739d7f375f3f61a2ce4f78ad44329f66;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git perf tools: Fix PERF_FLAG_FD_CLOEXEC flag probing event type open counters due to EBUSY error We were using PERF_COUNT_SW_CPU_CLOCK as an probing event type. Using expected PERF_TYPE_SOFTWARE type instead. Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Cc: William Cohen Cc: Yann Droneaud Link: http://lkml.kernel.org/r/20140803121036.GA1181@krava.brq.redhat.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/cloexec.c b/tools/perf/util/cloexec.c index dede0c388ed4..5073c01af618 100644 --- a/tools/perf/util/cloexec.c +++ b/tools/perf/util/cloexec.c @@ -9,7 +9,7 @@ static int perf_flag_probe(void) { /* use 'safest' configuration as used in perf_evsel__fallback() */ struct perf_event_attr attr = { - .type = PERF_COUNT_SW_CPU_CLOCK, + .type = PERF_TYPE_SOFTWARE, .config = PERF_COUNT_SW_CPU_CLOCK, }; int fd;