fix(executor): filter debug-section labels from SymbolTable#801
Open
Oppen wants to merge 1 commit into
Open
Conversation
SymbolTable::try_parse ignored st_shndx, so debug-section local labels (.L0, .Lline_table_start*) leaked in as fake functions and collided with real symbols sharing the same address, misattributing profiler cycles to whichever symbol sorted last in the tie. Reject symbols outside SHF_ALLOC sections and names starting with '.', restricting resolution to real .text function symbols.
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.
Summary
SymbolTable::try_parseignoredst_shndx, letting debug-section local labels (.L0,.Lline_table_start*) in as fake functions.textaddresses (assembler local-label reuse), so profiler lookups tied to a real symbol resolved to whichever entry sorted lastSHF_ALLOCsections and names starting with.Illustration (recursion single-query profile, top functions by cycle count)
Before:
After:
Test plan
make test-profile-recursion-single— real functions now appear instead of.L0make lintmake test— all pass except the 2 expected GPU test failures (no CUDA lib on this host)