summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/intel-pt-events.py
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2022-07-14 09:57:37 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2022-07-14 09:57:37 +0200
commitf83d9396d1f63048c423efa00e4e244da10a35fd (patch)
tree48da2cf9b20cc7049c92dd4a7dd74be11add86e5 /tools/perf/scripts/python/intel-pt-events.py
parent5ee8c8f930ba7d20717c4fc2d9f1ce0e757d1155 (diff)
parent0180290abb5ce5c870f84a00ffeda5802f641dce (diff)
Merge drm/drm-next into drm-misc-next-fixes
Backmerging from drm/drm-next for the final fixes that will go into v5.20. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to 'tools/perf/scripts/python/intel-pt-events.py')
-rw-r--r--tools/perf/scripts/python/intel-pt-events.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/scripts/python/intel-pt-events.py b/tools/perf/scripts/python/intel-pt-events.py
index 973bd12b7b40..9b7746b89381 100644
--- a/tools/perf/scripts/python/intel-pt-events.py
+++ b/tools/perf/scripts/python/intel-pt-events.py
@@ -104,7 +104,13 @@ def print_ptwrite(raw_buf):
flags = data[0]
payload = data[1]
exact_ip = flags & 1
- print("IP: %u payload: %#x" % (exact_ip, payload), end=' ')
+ try:
+ s = payload.to_bytes(8, "little").decode("ascii").rstrip("\x00")
+ if not s.isprintable():
+ s = ""
+ except:
+ s = ""
+ print("IP: %u payload: %#x" % (exact_ip, payload), s, end=' ')
def print_cbr(raw_buf):
data = struct.unpack_from("<BBBBII", raw_buf)