I'm trying to performance profile the C5 Generic Collection Library for C# and CLI with Visual Studio 2012 Ultimate. Since the project has no executable I've made a new Console Application project in the solution. The project contains a simple class with a main method creating one of the data structures with a large collection of elements. The problem is that my CPU sampling always returns with the following output:
Profiling started.
Profiling process ID 2684 (C5.Performance).
Process ID 2684 has exited.
Data written to C:\<some path>\C5\C5.Performance130904.vsp.
Profiling finished.
PRF0025: No data was collected.
Profiling complete.
and a confirm box that says PRF0025: No data was collected. I've tried to changed the collection size so the CPU would have more to do, but without any luck. I have no problem doing .NET memory allocation profiling.
I run Windows 7 on a VirtualBox on a OSX host.
I am coming across the same issue. The common factor is VirtualBox.
CPU sampling does not always work in VirtualBox. It is to do with a bug in VirtualBox where it does not properly implement a hardware clock. I suspect the problem could be hardware specific, it may work under some machines but not others. I know for certain that it doesn't work under my hardware configuration.
See the links below for more details:
A VirtualBox bug ticket detailing the problem
A ServerFault Question with detailed answers on the problem
I do not have a solution to the problem but it is definitely a problem that exists in VirtualBox.
Enable Collect .NET object allocation information
under the property pages:
- In Performance Explorer, right-click the performance session, and then click Properties.
- On the Performance Session Property Pages dialog box, click the General tab, and select the Collect .NET object allocation information check box.
- To collect .NET object lifetime data, select the Also collect .NET object lifetime information check box.