hotspot icon indicating copy to clipboard operation
hotspot copied to clipboard

Show inclusive costs in Assembly/Disassembly View

Open GitMensch opened this issue 8 months ago • 4 comments

Is your feature request related to a problem? Please describe. I'm looking at disassembly that is generated from COBOL (so COBOL on the left side) where one COBOL statement may yield in multiple C functions being called. The Source View already have "cycles (self)" [= local code] and "cycles (incl.)", but that's only one inclusive cost for the complete line (which is totally right there). The Disassembly View shows where the local code actually spends its time and it shows all called C functions - but their actual cost cannot be seen as the callq instructions commonly have no or nearly no cost attached and "behind that" is where the "cycles (incl.)" from the left actually are (but again one cannot see in which of the called functions).

Describe the solution you'd like Preferably have the cost of the called functions added to the cycles for callq, otherwise renamed the current "cycles" column to "cycles (self)" and add "cycles (incl.)".

Describe alternatives you've considered Check the called functions on their own in the caller/callee tab and see if the function currently under test is listed, but then the there's only a guess to the hint "is this relevant for that code path", while it would be directly visible in the disassembly view otherwise.

Additional context Here's a very simple recording showing this. hotspot Hotspot shows the sampling to have 11% on line 9 but the assembly has no cyles, because apart from simple single-instructions it is all done in a called function. But there's no way to see in which function. Compare with kcachegrind where each call has the amount of instructions per call and one can see that the third call to cob_append_string is the expensive one kcachegrind disassembly

GitMensch avatar Oct 11 '23 20:10 GitMensch