-
Notifications
You must be signed in to change notification settings - Fork 615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Source listing handles missing binaries and addresses. #628
Conversation
Some profiles can contain locations without an address, or reference binaries/libraries that are not available. Treat these better when producing source listings by using any source information present directly in the profile.Location. Details: If a location does not have an address, create a synthetic address that does not fall in a known mapping. If a location references an object file that is not found, use any file/line information baked directly in the location. Tweaked generated html to clicking for source lines that have no inlining/assembly to display.
Codecov Report
@@ Coverage Diff @@
## master #628 +/- ##
==========================================
+ Coverage 67.05% 67.32% +0.26%
==========================================
Files 39 40 +1
Lines 7246 7295 +49
==========================================
+ Hits 4859 4911 +52
+ Misses 1950 1948 -2
+ Partials 437 436 -1
Continue to review full report at Codecov.
|
addr = sp.synth.address(loc) | ||
} | ||
|
||
cum[addr] += value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pre-existing and doesn't have to be changed (if it needs to be changed) in this CL, but: do we handle recursion correctly here? It feels that we'll double count the cumulative time if the same address is present multiple times in the stack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are right. Let me look at that in a separate change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hate to butt in here, but is there a chance that this is related to #720?
I'm not familiar with this code, but a flavor of #720 manifested for me with the following conditions:
- using
weblist
instead oflist
- providing the binary for disassembly
and had the following behavior:
- in a sample function that had 4 caller locations, the count was 5x what the expected value (e.g. that returned by
list
orweblist
without the binary) was. - the printed assembly was printed 5 times
As far as I can tell, that fits the bill for the code in question here: the call tree for this function is only invoked for web printing and not the CLI interactions
Some profiles can contain locations without an address, or reference
binaries/libraries that are not available. Treat these better when
producing source listings by using any source information present
directly in the profile.Location.
Details:
If a location does not have an address, create a synthetic address
that does not fall in a known mapping.
If a location references an object file that is not found, use any
file/line information baked directly in the location.
Tweaked generated html to clicking for source lines that have no
inlining/assembly to display.
Fixes #621.