3 ms·
Somebody should modify perf to log "time spent in call", "time spent in stackframe setup", "time spent in mov", "time spent in branches", etc.
by FeepingCreature 12y ago
Somebody should modify perf to log "time spent in call", "time spent in stackframe setup", "time spent in mov", "time spent in branches", etc.
- DannyBee 12y agoSo, you can get some of these kinds of cycle counts by changing the event that gets used for record. https://perf.wiki.kernel.org/index.php/Tutorial#Events https://perf.wiki.kernel.org/index.php/Tutorial#Events So you could use record -e branch_instructions, for example. Past that, things like "time spent in stackframe setup" is not sane to measure on an optimized binary, because the instructions hat set up the stack frame may be all over the place (due to shrink wrapping, etc). This means the overhead of counting them would probably require instrumentation and be quite high (and perf is sampling based, not instrumentation based)
- FeepingCreature 12y ago> Past that, things like "time spent in stackframe setup" is not sane to measure on an optimized binary, because the instructions hat set up the stack frame may be all over the place (due to shrink wrapping, etc). Doesn't debug info already account for stuff like this? So we can give line number info if you break on any instruction? Seems to me you'd "just" need to augment debug info with performance classes, then let the profiler display worry about classification after the fact.