segment-specific rdpmc counter

segment-specific rdpmc counter

It would be really nice to have a way to count unhalted core cycles that only counts the cycles while executing code in a specific segment. This would allow for performance counting at user-level even with a kernel dealing with interrupts and other threads possibly preempting the userland code.

Perhaps this already exists, or another solution is available for counting cycles at user-level on a preemptive kernel?

Sidenote: It'd also be awesome to have an edx:eax -> rax and rax -> edx:eax instruction.

-Brandon Falk

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.