]> git.baikalelectronics.ru Git - kernel.git/commit
perf intel-pt: Add support for PERF_RECORD_SWITCH
authorAdrian Hunter <adrian.hunter@intel.com>
Thu, 13 Aug 2015 09:40:57 +0000 (12:40 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 4 Sep 2015 15:01:05 +0000 (12:01 -0300)
commit2a7a2ad6b6778725e966776dd036951b275540ad
treed536022cb55f7d0d3d2d98e7b70ad39f84919dee
parent355e1769463555dd931f01adb43de9f830e32b69
perf intel-pt: Add support for PERF_RECORD_SWITCH

Add support for selecting and processing PERF_RECORD_SWITCH events for
use by Intel PT.  If they are available, they will be used in preference
to sched_switch events.

This enables an unprivileged user to trace multi-threaded or
multi-process workloads with any level of perf_event_paranoid.  However
it depends on kernel support for PERF_RECORD_SWITCH.

Without this patch, tracing a multi-threaded workload will decode
without error but all the data will be attributed to the main thread.

Without this patch, tracing a multi-process workload will result in
decoder errors because the decoder will not know which executable is
executing.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1439458857-30636-3-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/x86/util/intel-pt.c
tools/perf/util/intel-pt.c