Repository navigation
fix(tools): analyze-perf fails when every TaskSmack function it sampled is an unresolved address, and says why (#2977) - #3016
Merged
Conversation
…ed is an unresolved address, and says why (#2977) A perf without libelf/DWARF (WSL's) names no function, and the script printed the bare addresses as a normal "Top N functions" summary with exit 0; its "(No symbols found)" fallback never ran either, since head made the pipeline succeed. It now counts the report's user-space rows: when all of TaskSmack's own are addresses it exits 3 and shows perf's libelf/DWARF/libunwind build options and what to do (--allow-unresolved keeps the report with a warning); some unresolved warns; system libraries' only get a note. Tested against a stub perf (tests/tools/test_analyze_perf_sh.py). Fixes #2977 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
mgradwohl
marked this pull request as ready for review
October 26, 2026 04:51
mgradwohl
enabled auto-merge (squash)
October 26, 2026 04:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #2977
tools/analyze-perf.shprinted a normal "Top N functions" summary and exited 0 even when every TaskSmack function was a bare address. That's what a perf without libelf/DWARF, such as WSL's, produces. Its "(No symbols found)" fallback never ran either, becauseheadmade the pipeline succeed.libelf/dwarf/libunwindbuild options and suggests a perf with symbol support orllvm-symbolizer.--allow-unresolvedkeeps the address-only report, with a warning, for whoever wants it anyway.PR Size
✅ Small to medium (~80 lines of script, ~120 of test).
Type of Change
Checklist
pre-commit run --all-filesor installed pre-commit hooks (shellcheck included)Testing
New
tests/tools/test_analyze_perf_sh.py, registered as CTestAnalyzePerfShScripton Linux, runs a copy of the script against a stubperfthat serves canned reports. It covers all-unresolved (exit 3, with the explanation),--allow-unresolved, resolved, partly unresolved, and kernel-only reports. All 5 pass.Additional Notes
v0.10.0, no backport (the issue's milestone).
🤖 Generated with Claude Code