VirtualBox

Ticket #10754 (new defect)

Opened 3 years ago

Last modified 3 years 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

Description

When I run xperf -on latency -stackwalk profile in Windows 8 it doesn't capture CPU Sampling data ( http://msdn.microsoft.com/en-us/library/ff191014.aspx,  http://blogs.msdn.com/b/pigscanfly/archive/2009/08/06/stack-walking-in-xperf.aspx )

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

Attachments

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

Change History

Changed 3 years ago by Andre.Ziegler

comment:1 Changed 3 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 3 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 3 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 3 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 3 years ago by Andre.Ziegler

VMware Workstation 9 and Player 5 support it

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

Changed 3 years ago by Andre.Ziegler

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use