perf/x86_64: Improve user regs sampling
authorAndy Lutomirski <luto@amacapital.net>
Sun, 4 Jan 2015 18:36:20 +0000 (10:36 -0800)
committerIngo Molnar <mingo@kernel.org>
Fri, 9 Jan 2015 10:12:29 +0000 (11:12 +0100)
commit86c269fea37334687b1c0789e6444be0d750e8a6
tree48be5f16eb1a54c7e8e483924bdb1ae77dee0262
parent88a7c26af8dab2f2d69f5a6067eb670694ec38c0
perf/x86_64: Improve user regs sampling

Perf reports user regs for kernel-mode samples so that samples can
be backtraced through user code.  The old code was very broken in
syscall context, resulting in useless backtraces.

The new code, in contrast, is still dangerously racy, but it should
at least work most of the time.

Tested-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: chenggang.qcg@taobao.com
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/243560c26ff0f739978e2459e203f6515367634d.1420396372.git.luto@amacapital.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/perf_regs.c