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)
> 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.
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)