perf: Enable catching pebs events through ptrace
For debugging TSX aborts it's useful to handle those in a debugger (gdb)
The debugger can use the perf interface to read them of course, but it
cannot stop the process fast enough.
This patch adds a new ptrace event to let debuggers request a ptrace
stop on a user space pebs interrupt for a process. This appears like
other auxilliary ptrace events, like fork or exit. ptrace has the
support to stop the process, until the debugger decides to continue
it. The debugger uses then the normal perf interface to query
details.
I use an own exit bit for this for now, mainly because it's awkward
to get a exit notifier in the NMI handler.
Cc: markus.t.metzger@intel.com
Signed-off-by: Andi Kleen <ak@linux.intel.com>
4 files changed