linux-stable/tools/perf
Thomas Richter 2b1444f2e2 perf report: Add raw report support for s390 auxiliary trace
Add support for s390 auxiliary trace support.

Use 'perf record -e rbd000' to create the perf.data file.  The event
also has the symbolic name SF_CYCLES_BASIC_DIAG, using 'perf record -e
SF_CYCLES_BASIC_DIAG' is equivalent.

Use 'perf report -D' to display the auxiliary trace data.

Output before:

 0 0 0x25a66 [0x30]: PERF_RECORD_AUXTRACE size: 0x40000
                 offset: 0  ref: 0  idx: 4  tid: -1  cpu: 4
     Nothing else

Output after:

 0 0 0x25a66 [0x30]: PERF_RECORD_AUXTRACE size: 0x40000
                  offset: 0  ref: 0  idx: 4  tid: -1  cpu: 4
 .
 . ... s390 AUX data: size 262144 bytes
    [00000000] Basic   Def:0001 Inst:0000 TW   AS:3 ASN:0xffff IA:0x0000000000c2f1bc
		CL:1 HPP:0x8000000000000000 GPP:000000000000000000
    [0x000020] Diag    Def:8005
    [0x0000bf] Basic   Def:0001 Inst:0000 TW   AS:3 ASN:0xffff IA:0x0000000000c2f1bc
		CL:1 HPP:0x8000000000000000 GPP:000000000000000000
    [0x0000df] Diag    Def:8005
    [0x00017e] Basic   Def:0001 Inst:0000 TW   AS:3 ASN:0xffff IA:0x0000000000c2f1bc
		CL:1 HPP:0x8000000000000000 GPP:000000000000000000
    ....
    [0x000fc0] Trailer F T bsdes:32 dsdes:159 Overflow:0 Time:0xd4ab59a8450fa108
		C:1 TOD:0xd4ab4ec98ceb3832 1:0x8000000000000000 2:0xd4ab4ec98ceb3832

This output is shown for every sampled data block. The
output contains the

 - basic-sampling data entry

 - diagnostic-sampling data entry

 - trailer entry

The basic sampling entry and diagnostic sampling entry sizes can be
extracted using the trailer entries in the SDB.  On older hardware these
values (bsdes and dsdes in the trailer entry) are reserved and zero.
Older hardware use hard coded values based on the s390 machine type.

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Link: http://lkml.kernel.org/r/20180802074622.13641-3-tmricht@linux.ibm.com
Link: http://lkml.kernel.org/r/eda2632e-7919-5ffd-5f68-821e77d216fa@linux.ibm.com
[ Merged a fix for a 'tipe puned' problem reported by Michael Ellerman see last Link tag. ]
[ Removed __packed from two structs, they're already naturally packed and having that. ]
[ attribute breaks the build in gcc 8.1.1 mips, 4.4.7 x86_64, 7.1.1 ARCompact ISA, etc) ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-08-08 15:26:48 -03:00
..
arch perf auxtrace: Support for perf report -D for s390 2018-08-03 10:34:18 -03:00
bench tools arch: Update arch/x86/lib/memcpy_64.S copy used in 'perf bench mem memcpy' 2018-07-30 12:36:51 -03:00
Documentation perf list: Add missing documentation for --desc and --debug options 2018-07-24 14:49:57 -03:00
examples/bpf perf bpf: Add probe() helper to reduce kprobes boilerplate 2018-05-15 14:31:24 -03:00
include/bpf perf bpf: Include uapi/linux/bpf.h from the 'perf trace' script's bpf.h 2018-08-01 12:34:06 -03:00
jvmti perf tools: Fix compilation errors on gcc8 2018-07-11 09:39:57 -04:00
pmu-events perf vendor events arm64: Update ThunderX2 implementation defined pmu core events 2018-07-31 11:28:44 -03:00
python perf python: Make twatch.py work with both python2 and python3 2018-02-19 12:28:08 -03:00
scripts perf scripts python: Add Python 3 support to EventClass.py 2018-07-11 10:01:50 -03:00
tests perf tests: Fix indexing when invoking subtests 2018-07-31 10:52:51 -03:00
trace perf trace beauty: Add beautifiers for 'socket''s 'protocol' arg 2018-07-31 10:52:47 -03:00
ui perf hists: Clarify callchain disabling when available 2018-07-24 14:37:33 -03:00
util perf report: Add raw report support for s390 auxiliary trace 2018-08-08 15:26:48 -03:00
.gitignore perf tools: Add trace/beauty/generated/ into .gitignore 2018-02-05 13:58:02 -03:00
Build perf trace: Remove audit-libs dependency if syscall tables are present 2018-01-23 09:51:38 -03:00
builtin-annotate.c perf tools: Fix crash caused by accessing feat_ops[HEADER_LAST_FEATURE] 2018-06-25 11:59:37 -03:00
builtin-bench.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
builtin-buildid-cache.c perf buildid-cache: Warn --purge-all failures 2018-05-15 10:32:16 -03:00
builtin-buildid-list.c Merge branch 'linus' into perf/core, to fix conflicts 2017-11-07 10:30:18 +01:00
builtin-c2c.c perf c2c report: Fix crash for empty browser 2018-07-31 10:53:20 -03:00
builtin-config.c Merge branch 'linus' into perf/core, to fix conflicts 2017-11-07 10:30:18 +01:00
builtin-data.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
builtin-diff.c perf hists: Clarify callchain disabling when available 2018-07-24 14:37:33 -03:00
builtin-evlist.c Merge branch 'linus' into perf/core, to fix conflicts 2017-11-07 10:30:18 +01:00
builtin-ftrace.c perf ftrace: Append an EOL when write tracing files 2018-02-19 09:49:12 -03:00
builtin-help.c perf tools: Rename HAVE_SYSCALL_TABLE to HAVE_SYSCALL_TABLE_SUPPORT 2018-04-12 10:33:31 -03:00
builtin-inject.c perf thread: Make thread__find_map() return the map 2018-04-26 13:47:08 -03:00
builtin-kallsyms.c perf machine: Ditch find_kernel_function variants 2018-04-30 12:20:54 -03:00
builtin-kmem.c perf machine: Ditch find_kernel_function variants 2018-04-30 12:20:54 -03:00
builtin-kvm.c perf tools: Ditch the symbol_conf.nr_events global 2018-06-04 10:28:52 -03:00
builtin-list.c Merge branch 'linus' into perf/core, to fix conflicts 2017-11-07 10:30:18 +01:00
builtin-lock.c Merge branch 'linus' into perf/core, to fix conflicts 2017-11-07 10:30:18 +01:00
builtin-mem.c perf mem: Allow all record/report options 2018-04-18 15:35:48 -03:00
builtin-probe.c perf tools: No need to check if the argument to __get() function is NULL 2018-06-04 10:28:50 -03:00
builtin-record.c perf record: Synthesize features before events in pipe mode 2018-03-16 13:56:50 -03:00
builtin-report.c perf hists: Clarify callchain disabling when available 2018-07-24 14:37:33 -03:00
builtin-sched.c perf sched: Use sched->show_callchain where appropriate 2018-06-05 10:09:54 -03:00
builtin-script.c perf tools: Fix crash caused by accessing feat_ops[HEADER_LAST_FEATURE] 2018-06-25 11:59:37 -03:00
builtin-stat.c perf stat: Get rid of extra clock display function 2018-07-24 14:54:58 -03:00
builtin-timechart.c perf thread: Make thread__find_symbol() return the symbol searched 2018-04-26 13:47:09 -03:00
builtin-top.c perf hists: Clarify callchain disabling when available 2018-07-24 14:37:33 -03:00
builtin-trace.c perf trace: Use perf_evsel__sc_tp_{uint,ptr} for "id"/"args" handling syscalls:* events 2018-08-02 15:39:00 -03:00
builtin-version.c perf version: Print status for syscall_table 2018-04-12 10:33:34 -03:00
builtin.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
check-headers.sh tools include uapi: Grab a copy of linux/in.h 2018-07-31 10:52:37 -03:00
command-list.txt
CREDITS
design.txt
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile.config perf build: Fix installation directory for eBPF 2018-07-31 10:54:50 -03:00
Makefile.perf perf trace beauty: Add beautifiers for 'socket''s 'protocol' arg 2018-07-31 10:52:47 -03:00
MANIFEST perf tools: Get all of tools/{arch,include}/ in the MANIFEST 2017-09-25 10:39:43 -03:00
perf-archive.sh License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf-completion.sh perf tools: Auto-complete for events with ':' 2017-12-27 12:16:00 -03:00
perf-read-vdso.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf-sys.h Drop a bunch of metag references 2018-02-23 14:29:59 +00:00
perf-with-kcore.sh
perf.c perf tools: Remove dead quote.[ch] code 2018-06-04 10:28:50 -03:00
perf.h perf tools: Allow overriding MAX_NR_CPUS at compile time 2018-08-01 12:33:24 -03:00