linux-stable/tools/perf
Adrian Hunter a5014310f7 perf script: Print Intel ptwrite value as a string if it is ASCII
It can be convenient to put a string value into a ptwrite payload as
a quick and easy way to identify what is being printed.

To make that useful, if the Intel ptwrite payload value contains only
printable ASCII characters padded with NULLs, then print it also as a
string.

Using the example program from the "Emulated PTWRITE" section of
tools/perf/Documentation/perf-intel-pt.txt:

 $ echo -n "Hello" | od -t x8
 0000000 0000006f6c6c6548
 0000005
 $ perf record -e intel_pt//u ./eg_ptw 0x0000006f6c6c6548
 [ perf record: Woken up 1 times to write data ]
 [ perf record: Captured and wrote 0.016 MB perf.data ]
 $ perf script --itrace=ew
           eg_ptw 35563 [005] 18256.087338:     ptwrite:  IP: 0 payload: 0x6f6c6c6548 Hello      55e764db5196 perf_emulate_ptwrite+0x16 (/home/user/eg_ptw)
 $

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20220509152400.376613-3-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2022-05-17 11:56:02 -03:00
..
arch perf auxtrace: Record whether an auxtrace mmap is needed 2022-05-10 14:27:19 -03:00
bench perf bench breakpoint: Fix build on 32-bit arches 2022-05-16 21:23:09 -03:00
dlfilters
Documentation perf intel-pt: Add support for emulated ptwrite 2022-05-17 11:55:49 -03:00
examples/bpf
include
jvmti
pmu-events perf vendor events intel: Update CLX events to v1.15 2022-05-04 12:52:04 -03:00
python perf python: Convert tracepoint.py example to python3 2022-04-01 16:19:35 -03:00
scripts
tests Merge remote-tracking branch 'torvalds/master' into perf/core 2022-05-16 10:14:59 -03:00
trace perf beauty: Update copy of linux/socket.h with the kernel sources 2022-04-01 16:19:34 -03:00
ui
util perf intel-pt: Add support for emulated ptwrite 2022-05-17 11:55:49 -03:00
.gitignore perf tools: Delete perf-with-kcore.sh script 2022-04-27 20:11:26 -03:00
Build
builtin-annotate.c perf annotate: Add --percent-limit option 2022-05-10 14:37:55 -03:00
builtin-bench.c perf bench: Add breakpoint benchmarks 2022-05-13 11:00:38 -03:00
builtin-buildid-cache.c
builtin-buildid-list.c
builtin-c2c.c perf tools: Enhance the matching of sub-commands abbreviations 2022-03-26 10:55:57 -03:00
builtin-config.c
builtin-daemon.c
builtin-data.c
builtin-diff.c
builtin-evlist.c
builtin-ftrace.c perf evlist: Rename cpus to user_requested_cpus 2022-04-01 16:19:35 -03:00
builtin-help.c
builtin-inject.c
builtin-kallsyms.c
builtin-kmem.c perf tools: Enhance the matching of sub-commands abbreviations 2022-03-26 10:55:57 -03:00
builtin-kvm.c perf tools: Enhance the matching of sub-commands abbreviations 2022-03-26 10:55:57 -03:00
builtin-list.c
builtin-lock.c perf tools: Enhance the matching of sub-commands abbreviations 2022-03-26 10:55:57 -03:00
builtin-mem.c perf tools: Enhance the matching of sub-commands abbreviations 2022-03-26 10:55:57 -03:00
builtin-probe.c
builtin-record.c perf cpumap: Switch to using perf_cpu_map API 2022-05-05 14:07:27 -03:00
builtin-report.c perf report: Set PERF_SAMPLE_DATA_SRC bit for Arm SPE event 2022-04-22 18:39:34 -03:00
builtin-sched.c perf tools: Enhance the matching of sub-commands abbreviations 2022-03-26 10:55:57 -03:00
builtin-script.c perf script: Print Intel ptwrite value as a string if it is ASCII 2022-05-17 11:56:02 -03:00
builtin-stat.c perf stat: Support hybrid --topdown option 2022-04-24 07:50:18 -03:00
builtin-timechart.c perf tools: Enhance the matching of sub-commands abbreviations 2022-03-26 10:55:57 -03:00
builtin-top.c perf evlist: Rename cpus to user_requested_cpus 2022-04-01 16:19:35 -03:00
builtin-trace.c
builtin-version.c perf version: Add HAVE_DEBUGINFOD_SUPPORT to built-in features 2022-04-20 13:32:09 -03:00
builtin.h
check-headers.sh
command-list.txt
CREDITS
design.txt
Makefile
Makefile.config perf tools: Use Python devtools for version autodetection rather than runtime 2022-05-03 11:23:44 -03:00
Makefile.perf perf tools: Delete perf-with-kcore.sh script 2022-04-27 20:11:26 -03:00
MANIFEST
perf-archive.sh
perf-completion.sh
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c perf tools: Add external commands to list-cmds 2022-04-09 14:21:00 -03:00
perf.h