summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2022-05-09 18:23:59 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-05-17 11:56:02 -0300
commita5014310f7a9b6486daa8e8852e3d1f2ba323328 (patch)
tree0361b8cf109507e4c70877b9e2bf4d25769e2eff /tools/perf/scripts/python/export-to-postgresql.py
parentd7015e50a9ed180dcc3947635bb2b5711c37f48b (diff)
downloadlwn-a5014310f7a9b6486daa8e8852e3d1f2ba323328.tar.gz
lwn-a5014310f7a9b6486daa8e8852e3d1f2ba323328.zip
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>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions