]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf scripts python: exported-sql-viewer.py: Fix pattern matching with Python 3
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 12 May 2025 09:39:32 +0000 (12:39 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:05:15 +0000 (11:05 +0100)
commit8d39a6fd984309d4eb2cdb48d0d1484748f48de3
treecf6ae69b185c3e806f1cb7294e3162fad36fdd3e
parent9d06ac32c202142da40904180f2669ed4f5073ac
perf scripts python: exported-sql-viewer.py: Fix pattern matching with Python 3

[ Upstream commit 17e548405a81665fd14cee960db7d093d1396400 ]

The script allows the user to enter patterns to find symbols.

The pattern matching characters are converted for use in SQL.

For PostgreSQL the conversion involves using the Python maketrans()
method which is slightly different in Python 3 compared with Python 2.

Fix to work in Python 3.

Fixes: beda0e725e5f06ac ("perf script python: Add Python3 support to exported-sql-viewer.py")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Tony Jones <tonyj@suse.de>
Link: https://lore.kernel.org/r/20250512093932.79854-4-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/perf/scripts/python/exported-sql-viewer.py