aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorThomas Hellström <thomas.hellstrom@linux.intel.com>2025-06-09 18:26:55 +0200
committerThomas Hellström <thomas.hellstrom@linux.intel.com>2025-06-09 18:54:05 +0200
commit86e2d052c2320bf12571a5d96b16c2745e1cfc5e (patch)
treeddd7e116a07fc3126c1941a46c74257a0adae333 /tools/perf/scripts/python
parentdrm/xe: GSM size should be constant on most platforms (diff)
parentLinux 6.16-rc1 (diff)
downloadlinux-86e2d052c2320bf12571a5d96b16c2745e1cfc5e.tar.gz
linux-86e2d052c2320bf12571a5d96b16c2745e1cfc5e.zip
Merge drm/drm-next into drm-xe-next
Backmerging to bring in 6.16 Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python')
-rwxr-xr-xtools/perf/scripts/python/exported-sql-viewer.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/scripts/python/exported-sql-viewer.py b/tools/perf/scripts/python/exported-sql-viewer.py
index 121cf61ba1b3..e0b2e7268ef6 100755
--- a/tools/perf/scripts/python/exported-sql-viewer.py
+++ b/tools/perf/scripts/python/exported-sql-viewer.py
@@ -680,7 +680,10 @@ class CallGraphModelBase(TreeModel):
s = value.replace("%", "\\%")
s = s.replace("_", "\\_")
# Translate * and ? into SQL LIKE pattern characters % and _
- trans = string.maketrans("*?", "%_")
+ if sys.version_info[0] == 3:
+ trans = str.maketrans("*?", "%_")
+ else:
+ trans = string.maketrans("*?", "%_")
match = " LIKE '" + str(s).translate(trans) + "'"
else:
match = " GLOB '" + str(value) + "'"