-
Notifications
You must be signed in to change notification settings - Fork 256
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
Attribute inline cost to caller #586
Comments
I would need a clear example code base with actual and expected data. I fail to understand this purely on this description I'm afraid |
That is no cpu cost shown in the code view (and also none in the disassembly) and you agree that cost should be shown in both, right? |
#671 has some more info and a simple example that shows how to reproduce this issue. I'll close this ticket here as a duplicate as the other one is nicely actionable on its own. Reopen if you think this is a mistake on my part. |
I'd say that closing this as a duplicate (or actually closing the newer one as duplicate) would be more appropriate. |
ah IIUC then the issue here is (also) about the left-hand file/line side inclusive cost being 0, whereas #672 handles the right-hand addr cost side of things? |
yes, that's right for both my example output and the one from the sample given above, the later can be reproduced with current continuous build
|
From #568:
I try to explain what I've thought to understand and what I think should be the UI for that.
perf
should trace the execution of that as it is tracing non-inlined codeRunning
objdump
shows the disassembly for the "outer" function, therefore the inlined code is part of the disassembly, possibly multiple times (= we can "see" the specific generation for this specific place).Code-wise we see a function call.
If we can deduce the place of that disassembly to be part of the "calling" place (where it is inlined) then we can directly attribute the costs there.
If we can't do it, then we still have the "original" place (source reference and/or function name) and on the other hand we have the costs in the function of "calling" it (this is something that can be seen in the caller/callee tab, also with this PR applied).
Ideally we'd then be able to attribute the "summed" costs for the disassembly to the calling place -but I do recognize that in this case we'd have to match that in the code, which is not possible to always get correct because of the preprocessor work (for example macros) - we shouldn't start that path.
This leaves the question: Is there a way to deduce the "calling" source reference for functions that are inlined? If we yes, then we should attribute the total costs to that place.
The text was updated successfully, but these errors were encountered: