Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.

Use PEBS sampling inside a qemu-kvm VM

New Contributor I

Hello to all,


I would like to use PEBS sampling from within a VM. I was under the impression that since linux kernel 6.3 the kvm module virtualizes PEBS counters. 


However, If I run foe example " perf record -d -e cpu/event=0xd1,umask=0x20/ppu -c 1 ls"

inside a qemu-kvm guest I get back: "PMU Hardware doesn't support sampling/overflow-interrupts"


I am running my experiments in a Sapphire Rapid cpu server and both guest and host run a 6.6 linux kernel. 


In the host I can run perf + PEBS correctly (i.e. the above command runs successfully and I get meaningful output from subsequent perf script command). 


My questions are: a) is it possible to use PEBS sampling/monitoring from within a VM and b) if yes do I need a dedicated qemu version or parameter?


Best Regards,


0 Kudos
0 Replies