From: Adrian Hunter Date: Tue, 12 Aug 2014 15:04:31 +0000 (+0300) Subject: perf tools: Prefer to use a cpu-wide event for probing CLOEXEC X-Git-Tag: omap-for-v3.19/prcm-cleanup~97^2~29^2~28 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6edb53c4993ffe92ce521fb449d1c146cea6ec2;p=pandora-kernel.git perf tools: Prefer to use a cpu-wide event for probing CLOEXEC When doing a system-wide trace with Intel PT, the jump label set up as a result of probing CLOEXEC gets reset while the trace is running. That causes an Intel PT decoding error because the object code (obtained from /proc/kcore) does not match the running code at that point. While we can't expect there never to be jump label changes, we can avoid cases that the perf tool itself creates. The problem is avoided by first trying a cpu-wide event (pid = -1) for probing the PERF_FLAG_FD_CLOEXEC flag and falling back to an event for the current process (pid = 0). Signed-off-by: Adrian Hunter Acked-by: Jiri Olsa Cc: David Ahern Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1407855871-15024-5-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- Reading git-diff-tree failed