Open GitMensch opened 1 year ago
I'm opposed to this idea - reordering based on cost in the source and assembly views leads to pretty confusing results.
if the problem is finding "local" hotspots faster, then I propose we follow vtune and it's controls to cycle through the hotspots in descending order. i.e. a simple button that starts at the top hotspot and then goes to the next hotspot and so forth before it wrap-arounds.
I have never used vtune so far, but I totally agree that an option to find skip through the hotspots (possibly by decreasing cost) would be much ore useful. This should be available for both "real local" and "inclusive" costs.
Your idea - which is definitely better - sounds good, but I fear that this would:
The column ordering seems to get down to just allowing to order by those columns - setting an attribute only. To be "less confusing" I'd suggest to always set the default ordering (by first column = line/address) when the view is opened (new disassembly chosen).
What do you think about making the columns able to sort for now, keeping that until the much more "vtune-like" feature arrives?
The very interesting option in kcachegrind (which is also the reason that the assembly view has a source reference) is that one can order by clicking on the columns, enabling you to order by costs (this way seeing "local" hotpots very fast), click on an interesting line to mark it, then order by line (source view) / address (disassembly), then use arrow-up to position on the line before the one you've marked before.
Originally posted by @GitMensch in https://github.com/KDAB/hotspot/issues/523#issuecomment-1761057797