Perf Events from inside of Qemu
The following patch enables simulated perf event support inside of Qemu
for x86_64 systems. It enables support for the
AMD performance MSRs enough to return values for the "retired_instructions"
(both user and kernel) and "cpu_clk_unhalted" events.
Usage:
- Apply the patch
- Boot into Qemu, using a kernel using 2.6.32 or newer.
Use the "-cpu phenom" option to select an AMD machine.
- Use the "perf" utility (or other method of accessing
perf counters, such as PAPI) as you normally would.
Sample output:
Patches (against git tree from 4 November 2010):
Todo
- Interrupts on overflow
- Implement events other than instructions and cycles
Back to my projects page