]> git.karo-electronics.de Git - karo-tx-linux.git/commit
perf: Add ability to sample machine state on interrupt
authorStephane Eranian <eranian@google.com>
Wed, 24 Sep 2014 11:48:37 +0000 (13:48 +0200)
committerIngo Molnar <mingo@kernel.org>
Sun, 16 Nov 2014 10:41:57 +0000 (11:41 +0100)
commit60e2364e60e86e81bc6377f49779779e6120977f
tree669f675c67744cbdd61291f2ec3d03cbb51288d3
parentaf4bdcf675cf768dc3558682fc178e0e3e70bb52
perf: Add ability to sample machine state on interrupt

Enable capture of interrupted machine state for each sample.

Registers to sample are passed per event in the sample_regs_intr bitmask.

To sample interrupt machine state, the PERF_SAMPLE_INTR_REGS must be passed in
sample_type.

The list of available registers is arch dependent and provided by asm/perf_regs.h

Registers are laid out as u64 in the order of the bit order of sample_intr_regs.

This patch also adds a new ABI version PERF_ATTR_SIZE_VER4 because we extend
the perf_event_attr struct with a new u64 field.

Reviewed-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: cebbert.lkml@gmail.com
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-api@vger.kernel.org
Link: http://lkml.kernel.org/r/1411559322-16548-2-git-send-email-eranian@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/perf_event.h
include/uapi/linux/perf_event.h
kernel/events/core.c