diff options
author | Maxime Ripard <maxime@cerno.tech> | 2022-06-08 20:11:27 +0300 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2022-06-08 20:11:27 +0300 |
commit | 6e2b347d42e54282e4c6cfa08272db462b178f7f (patch) | |
tree | 7686345b2e24c406a57feffcad558484f9552366 /tools/perf/scripts/python/intel-pt-events.py | |
parent | e54a4424925a27ed94dff046db3ce5caf4b1e748 (diff) | |
parent | f2906aa863381afb0015a9eb7fefad885d4e5a56 (diff) | |
download | linux-6e2b347d42e54282e4c6cfa08272db462b178f7f.tar.xz |
Merge v5.19-rc1 into drm-misc-fixes
Let's kick-off the start of the 5.19 fix cycle
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Diffstat (limited to 'tools/perf/scripts/python/intel-pt-events.py')
-rw-r--r-- | tools/perf/scripts/python/intel-pt-events.py | 8 |
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) |