Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What tools do you use to profile (native)C++ on Windows?

How do Window's programmers profile their native C++ code? On Unix/Linux you have gprof [thanks Evan] & valgrind (I personally used this one, although it's not a real profiler), and recently I'm on Mac and Solaris, which means I moved to dTrace. Now when I've had the need to profile on Windows in the past, like at my previous job, I used Intel's vtune, which is great, however it's commercial, and I don't have a license for private use, so I'm left wondering what's the standard (free is better) tool windows programmers commonly use?

Thanks in advance

like image 283
Robert Gould Avatar asked Dec 17 '22 10:12

Robert Gould


1 Answers

You should give Xperf a try - it's a new system wide performance tool that can drill down to a particular application and what exactly it's doing inside itself as well as what's it's asking of the OS.

It's freely available on the Windows SDK for Windows Server 2008 and .NET Framework 3.5 ISO:

  1. Install the SDK by downloading the ISO image, or using the Web based installer.
  2. Find the xperf MSI in the SDK's "bin" directory. It will be named xperf_x86.msi, xperf_x64.msi, or xperf_ia64.msi, depending on the architecture for which you install the SDK.
  3. You can then install the xperf tools from the MSI directly, or copy the xperf MSI file to another location and install it from there. For example, you could keep the MSI files on a USB key.

Source: Pigs Can Fly blog on MSDN.com

Just verified that the xperf msi will not install except on windows Vista or Windows 2007.

-Adam

like image 93
Adam Davis Avatar answered Dec 24 '22 21:12

Adam Davis