summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2025-06-11 09:01:34 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2025-06-11 09:01:34 +0200
commitc598d5eb9fb331ba17bc9ad67ae9a2231ca5aca5 (patch)
treea5b6f4655cde4f19b6b157aa455723c0329bd719 /tools/perf/scripts/python/exported-sql-viewer.py
parent29a9b3a504c0d18bcc7f0547371409e9dcbc045e (diff)
parent19272b37aa4f83ca52bdf9c16d5d81bdd1354494 (diff)
Merge drm/drm-next into drm-misc-next
Backmerging to forward to v6.16-rc1 Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
-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 121cf61ba1b34..e0b2e7268ef68 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) + "'"