VirtualBox

Opened 10 years ago

Last modified 7 years ago

#12495 reopened defect

Sampling profiling method not usable in Visual Studio 2013

Reported by: Donuts Owned by:
Component: other Version: VirtualBox 4.3.4
Keywords: Visual Studio VS2013 sampling profiler profiling Cc:
Guest type: Windows Host type: Linux

Description

Windows 7 Enterprise SP1 x86 guest (VM from Microsoft's http://modern.ie/ site), Lubuntu 11.10 x86-64 host. Laptop CPU Intel Core 2 Duo T8100. VM is set to use one CPU core.

I installed Visual Studio 2013 and am trying to use its profiling feature. However the "sampling" mode doesn't work. I can launch the executable to be profiled, but on exiting it Visual Studio reports that no samples were captured.

This bug report is to suggest that support for whichever CPU performance counters or timer hardware that Visual Studio profiling uses, be added to VirtualBox.

I found an MSDN blog post about profiliing in virtual environments: http://blogs.msdn.com/b/mgoldin/archive/2010/01/09/visual-studio-profiler-in-virtual-environment.aspx That mentions VS 2010, so I assume VS 2012 and VS 2013 have the same issue. According to that post, Visual Studio has specific support for VMWare, Virtual PC and Hyper-V VMs. "Visual Studio profiler usage on virtual machines was limited so far, as it didn’t support Sampling mode in such environment. I’m glad to note that in Visual Studio 2010 you can sample your applications inside of virtual machines. VMs could be created using either VPC, VMWare of Hyper-V technologies. Some hardware is not virtualized, though, and CPU performance counters (that are used by profiler) are, unfortunately, in the list. To overcome the issue, we used a different approach that targets each VM-vendor specifically, and timers that are used in virtual world are not the same as on a raw hardware. Some functionality, however, suffers from lack of CPU performance counters virtualization."

Also a comment at

http://serverfault.com/questions/194585/visual-studio-profiler-in-virtual-machine

mentions that profiling uses the Local APIC timer.

Change History (2)

comment:1 by aeichner, 8 years ago

Resolution: obsolete
Status: newclosed

Please reopen if still relevant with a recent VirtualBox release.

comment:2 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 #10754 so one of them should probably be closed as duplicate of the other one.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use