From eb3ba7f86e65ee20845cb76405998e813412c262 Mon Sep 17 00:00:00 2001 From: slicklash Date: Mon, 28 Oct 2024 14:49:01 +0100 Subject: [PATCH] suppress addr2line errors --- gprofiler/utils/perf_process.py | 17 +++++------------ scripts/perf_build.sh | 2 +- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/gprofiler/utils/perf_process.py b/gprofiler/utils/perf_process.py index b2de5bb50..e1e5db7b4 100644 --- a/gprofiler/utils/perf_process.py +++ b/gprofiler/utils/perf_process.py @@ -8,7 +8,6 @@ from psutil import Process -from gprofiler.exceptions import CalledProcessError from gprofiler.log import get_logger_adapter from gprofiler.utils import ( reap_process, @@ -190,17 +189,11 @@ def wait_and_script(self) -> str: perf_data.unlink() perf_data = inject_data - try: - perf_script_proc = run_process( - [perf_path(), "script", "-F", "+pid,+symline", "-i", str(perf_data)], - suppress_log=True, - ) - return perf_script_proc.stdout.decode("utf8") - except CalledProcessError as e: - # ignore addr2line errors - if isinstance(e.stderr, str) and e.stderr.startswith("addr2line"): - return e.stdout.decode("utf8") if isinstance(e.stdout, bytes) else str(e.stdout) - raise + perf_script_proc = run_process( + [perf_path(), "script", "-F", "+pid,+symline", "--no-addr2line-errors", "-i", str(perf_data)], + suppress_log=True, + ) + return perf_script_proc.stdout.decode("utf8") finally: perf_data.unlink() if self._inject_jit: diff --git a/scripts/perf_build.sh b/scripts/perf_build.sh index 05dba5a66..239154923 100755 --- a/scripts/perf_build.sh +++ b/scripts/perf_build.sh @@ -17,7 +17,7 @@ set -euo pipefail # downloading the zip because the git is very large (this is also very large, but still smaller) -curl -SL https://codeload.github.com/Granulate/linux/zip/9909d736d8b8927d79003dfa9732050a08c11221 -o linux.zip +curl -SL https://codeload.github.com/Granulate/linux/zip/b6107ebc2839e99eee8dff55adca75871b595395 -o linux.zip unzip -qq linux.zip rm linux.zip cd linux-*/