callchain: answer the pointer chain with the sites that can reach it - #77
Open
kuba-moo wants to merge 1 commit into
Open
callchain: answer the pointer chain with the sites that can reach it#77kuba-moo wants to merge 1 commit into
kuba-moo wants to merge 1 commit into
Conversation
`callers` and `callchain` read one index and disagreed. Sites are joined to registrations on the bare member name, and a site whose receiver type is not the type the function was installed in is marked as such; show_indirect_callers reports those as a count, and the reverse chain reported them as answers. can_rcv is installed in packet_type::func. `func` is also work_struct's, hda_fixup's, ac97_quirk's and the amdgpu calltables', so the section listed 27 dispatching functions ordered by name and cut the list at 15 — which stopped at for_each_frequency, with every site that receives a CAN frame past the end. The rows shown were a bcache work item and an amdgpu register-access macro, under a question about CAN. Walking the chain above a site is what the section costs, so the same defect was the cost: one walk per row shown, 15 of them paid for sites that reach nothing. `callchain can_rcv` took 34s, of which 14 belonged to CGS_CALL alone. It now takes 3.7s, names the three sites in net/core/dev.c that `callers` names, and counts the other 36 rather than walking them. A section with only member-name evidence still gets its heading and its count: saying nothing would claim the index knows of no way in, when it knows of one it cannot stand behind. That is why the return value grew from a count of rows to what the section said — the "isolated (no callers or callees)" line above it has to stay true. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
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.
callersandcallchainread one index and disagreed. Sites are joined to registrations on the bare member name, and a site whose receiver type is not the type the function was installed in is marked as such; show_indirect_callers reports those as a count, and the reverse chain reported them as answers.can_rcv is installed in packet_type::func.
funcis also work_struct's, hda_fixup's, ac97_quirk's and the amdgpu calltables', so the section listed 27 dispatching functions ordered by name and cut the list at 15 — which stopped at for_each_frequency, with every site that receives a CAN frame past the end. The rows shown were a bcache work item and an amdgpu register-access macro, under a question about CAN.Walking the chain above a site is what the section costs, so the same defect was the cost: one walk per row shown, 15 of them paid for sites that reach nothing.
callchain can_rcvtook 34s, of which 14 belonged to CGS_CALL alone. It now takes 3.7s, names the three sites in net/core/dev.c thatcallersnames, and counts the other 36 rather than walking them.A section with only member-name evidence still gets its heading and its count: saying nothing would claim the index knows of no way in, when it knows of one it cannot stand behind. That is why the return value grew from a count of rows to what the section said — the "isolated (no callers or callees)" line above it has to stay true.