Ticket #10754 (reopened defect)

Opened 6 years ago

Last modified 19 months ago

Running xperf -on latency -stackwalk profile doesn't capture CPU Sampling data in Windows 8

Reported by: Andre.Ziegler Owned by:
Priority: major Component: VMM
Version: VirtualBox 4.1.18 Keywords: xperf, Windows 8
Cc: Guest type: Windows
Host type: Windows


When I run xperf -on latency -stackwalk profile in Windows 8 it doesn't capture CPU Sampling data (, )

I've asked Microsoft and they told my that VirtualBox reports CPU h/w counters but then in fact not supporting them.


VBox.log Download (107.2 KB) - added by Andre.Ziegler 6 years ago.
VMWare_Player_5_PerfCounters.png Download (44.2 KB) - added by Andre.Ziegler 6 years ago.

Change History

Changed 6 years ago by Andre.Ziegler

comment:1 Changed 6 years ago by Andre.Ziegler

Any news? MSFT told me the tracing depends on "performance counter interrupts". VirtualBox reports it as supported, but it doesn't support it.

comment:2 Changed 6 years ago by frank

It is not that easy to decide what to implement. The only way to check if a CPU has performance counters is to execute the RDPMC instruction. If a GP is triggered, the CPU does not support this instruction or the index is wrong. Many applications don't do that but assume that a CPU with a certain family/model/stepping supports performance counters (according to the documentation). We added a dummy implementation of RDPMC years ago to fix a problem with a virus scanner. If software executes RDPMC within VirtualBox, that instruction will not trigger a GP but the returned values are 0/0 for every index. This might be the reason why xperf is not able to capture CPU sampling data.

There is currently no plan to change that. Providing sensible performance counter information inside a VM is always a challenge.

comment:3 Changed 6 years ago by Andre.Ziegler


This makes Virtualbox useless for me. I'll definitely not install Windows 8 on a native PC, so I need profiling support in a VM to test the impact of my apps to the OS. And xperf is fine to measure this.

comment:4 Changed 6 years ago by Andre.Ziegler

according to MSFT all other big players (Hyper-V, VMWare, Xen) support perf conters inside the VM which is 95% of the market share (according to MSFT). So only VB is not usable :(

comment:5 Changed 6 years ago by Andre.Ziegler

VMware Workstation 9 and Player 5 support it

Last edited 6 years ago by Andre.Ziegler (previous) (diff)

Changed 6 years ago by Andre.Ziegler

comment:6 Changed 22 months ago by aeichner

  • Status changed from new to closed
  • Resolution set to obsolete

Please reopen if still relevant with a recent VirtualBox release.

comment:7 Changed 19 months ago by simonis

  • Status changed from closed to reopened
  • Resolution obsolete deleted

I don't understand why this was closed as "obsolte" as I can not see that support for using hardware performance counters (PMUs) was added in recent VirtualBox versions. VMWare has added this feature a while ago (see

Please also implement this feature in VirtualBox to make it possible to use VirtualBox virtualized images for development tasks where profiling is required.

Also notice that this ticket is related to #12495 so one of them should probably be closed as duplicate of the other one.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use