linux-stable/tools/perf/Documentation
Adrian Hunter 400ea6d327 perf script: Add field option 'flags' to print sample flags
Instruction tracing will typically have access to information about the
instruction being executed for a particular ip sample.  Some of that
information will be available in the 'flags' member of struct
perf_sample.

With the addition of transactions events synthesis to Instruction
Tracing options, there is a need to be able easily to see the flags
because they show whether the ip is at the start, commit or abort of a
tranasaction.

Consequently add an option to display the flags.

The flags are "bcrosyiABEx" which stand for branch, call, return,
conditional, system, asynchronous, interrupt, transaction abort, trace
begin, trace end, and in transaction, respectively.

Example using Intel PT:

perf script -fip,time,event,sym,addr,flags

...
 1288.721584105: branches:u:   bo              401146 main =>           401152 main
 1288.721584105: transactions:   x                   0           401164 main
 1288.721584105: branches:u:   bx              40117c main =>           40119b main
 1288.721584105: branches:u:   box             4011a4 main =>           40117e main
 1288.721584105: branches:u:   bcx             401187 main =>           401094 g
...
 1288.721591645: branches:u:   bx              4010c4 g =>           4010cb g
 1288.721591645: branches:u:   brx             4010cc g =>           401189 main
 1288.721591645: transactions:                       0           4011a6 main
 1288.721593199: branches:u:   b               4011a9 main =>           4011af main
 1288.721593199: branches:u:   bo              4011bc main =>           40113e main
 1288.721593199: branches:u:   b               401150 main =>           40115a main
 1288.721593199: transactions:   x                   0           401164 main
 1288.721593199: branches:u:   bx              40117c main =>           40119b main
 1288.721593199: branches:u:   box             4011a4 main =>           40117e main
 1288.721593199: branches:u:   bcx             401187 main =>           40105e f
...
 1288.722284747: branches:u:   brx             401093 f =>           401189 main
 1288.722284747: branches:u:   box             4011a4 main =>           40117e main
 1288.722284747: branches:u:   bcx             401187 main =>           40105e f
 1288.722285883: transactions:   bA                  0           401071 f
 1288.722285883: branches:u:   bA              401071 f =>           40116a main
 1288.722285883: branches:u:   bE              40116a main =>                0 [unknown]
 1288.722297174: branches:u:   bB                   0 [unknown] =>           40116a main
...

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1428594864-29309-26-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-04-29 10:37:57 -03:00
..
android.txt perf tools: Add info about cross compiling for Android ARM 2012-10-31 12:17:49 -02:00
asciidoc.conf
Build.txt perf build: Add build documentation 2015-02-12 17:53:00 -03:00
examples.txt perf record: Remove -f/--force option 2013-07-08 17:37:25 -03:00
jit-interface.txt perf symbols: Add description of JIT interface 2012-08-13 14:55:02 -03:00
Makefile perf tools: Implement summary output for 'make install' 2013-10-11 12:18:11 -03:00
manpage-1.72.xsl
manpage-base.xsl
manpage-bold-literal.xsl
manpage-normal.xsl
manpage-suppress-sp.xsl
perf-annotate.txt perf annotate: Add basic support to event group view 2013-03-15 13:06:05 -03:00
perf-archive.txt perf archive: Remove duplicated 'runs' in man page 2013-12-09 15:21:45 -03:00
perf-bench.txt perf bench: Add --repeat option 2014-06-19 16:13:15 -03:00
perf-buildid-cache.txt perf buildid-cache: Add --purge FILE to remove all caches of FILE 2015-02-27 15:52:33 -03:00
perf-buildid-list.txt perf report: Accept fifos as input file 2011-12-23 17:01:03 -02:00
perf-data.txt perf data: Add perf data to CTF conversion support 2015-02-25 16:13:12 -03:00
perf-diff.txt perf diff: Add kallsyms option 2015-03-24 13:01:54 -03:00
perf-evlist.txt perf evlist: Add --group option 2013-01-31 13:07:49 -03:00
perf-help.txt
perf-inject.txt perf inject: Add Instruction Tracing support 2015-04-29 10:37:57 -03:00
perf-kmem.txt perf kmem: Analyze page allocator events also 2015-04-13 11:44:52 -03:00
perf-kvm.txt perf Documentation: Fix typos in perf/Documentation 2014-10-15 17:39:02 -03:00
perf-list.txt perf tools: Add 'I' event modifier for exclude_idle bit 2015-04-08 11:00:16 -03:00
perf-lock.txt perf lock: Account for lock average wait time 2013-10-09 11:24:01 -03:00
perf-mem.txt perf mem: Enable sampling loads and stores simultaneously 2015-01-21 13:24:31 -03:00
perf-probe.txt perf probe: Update man page 2015-02-06 11:46:36 +01:00
perf-record.txt perf record: Extend -m option for AUX area tracing mmap pages 2015-04-29 10:37:52 -03:00
perf-report.txt perf tools: Add pid/tid filtering to report and script commands 2015-03-24 13:02:46 -03:00
perf-sched.txt perf report: Accept fifos as input file 2011-12-23 17:01:03 -02:00
perf-script-perl.txt perf Documentation: Fix typos in perf/Documentation 2014-10-15 17:39:02 -03:00
perf-script-python.txt perf Documentation: Fix typos in perf/Documentation 2014-10-15 17:39:02 -03:00
perf-script.txt perf script: Add field option 'flags' to print sample flags 2015-04-29 10:37:57 -03:00
perf-stat.txt perf tools: Document parameterized and symbolic events 2015-01-21 13:24:33 -03:00
perf-test.txt perf Documentation: Fix typos in perf/Documentation 2014-10-15 17:39:02 -03:00
perf-timechart.txt perf timechart: Add more options to IO mode 2014-07-10 00:22:54 +02:00
perf-top.txt perf tools: Disable kernel symbol demangling by default 2014-09-17 17:08:09 -03:00
perf-trace.txt perf trace: Add man page entry for --event 2015-02-22 22:22:07 -03:00
perf.txt perf data: Add perf data to CTF conversion support 2015-02-25 16:13:12 -03:00
perfconfig.example perf annotate browser: Read perf config file for settings 2012-05-29 22:06:30 -03:00