diff options
| author | 2022-08-05 18:37:03 +0200 | |
|---|---|---|
| committer | 2022-08-05 18:37:03 +0200 | |
| commit | 446279168e030fd0ed68e2bba336bef8bb3da352 (patch) | |
| tree | 0944d4dc64b07f74a6cf73d2ce803a789f8d786d /tools/perf/scripts/python/intel-pt-events.py | |
| parent | gfs2: Minor gfs2_glock_nq_m cleanup (diff) | |
| parent | gfs2: List traversal in do_promote is safe (diff) | |
Merge part of branch 'for-next.instantiate' into for-next
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) |
