VirtualBox

Opened 12 years ago

Last modified 5 years ago

#10754 reopened defect

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

Reported by: Andre.Ziegler Owned by:
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 (2)

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

Download all attachments as: .zip

Change History (11)

by Andre.Ziegler, 12 years ago

Attachment: VBox.log added

comment:1 by Andre.Ziegler, 12 years ago

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 by Frank Mehnert, 12 years ago

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 by Andre.Ziegler, 12 years ago

:(

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 by Andre.Ziegler, 12 years ago

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 by Andre.Ziegler, 12 years ago

VMware Workstation 9 and Player 5 now support it

Version 0, edited 12 years ago by Andre.Ziegler (next)

by Andre.Ziegler, 12 years ago

comment:6 by aeichner, 8 years ago

Resolution: obsolete
Status: newclosed

Please reopen if still relevant with a recent VirtualBox release.

comment:7 by simonis, 7 years ago

Resolution: obsolete
Status: closedreopened

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 https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2030221).

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.

comment:8 by alberth, 5 years ago

I also need PMU for perf. It would be nice to have it in VirtualBox.

comment:9 by Ameya Vikram Singh, 5 years ago

I also need this feature to be implemented in VirtualBox. Can anyone from the development team comment about if there is a plan to implement this feature? It is almost 7+ years now!!!

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use