Skip to content

Commit

Permalink
suppress addr2line errors
Browse files Browse the repository at this point in the history
  • Loading branch information
slicklash committed Oct 28, 2024
1 parent 58788cb commit eb3ba7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
17 changes: 5 additions & 12 deletions gprofiler/utils/perf_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion scripts/perf_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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-*/
Expand Down

0 comments on commit eb3ba7f

Please sign in to comment.