Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So, 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

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: