简体   繁体   中英

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

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

I got AMD Code Analyst . It's free, and you don't need an AMD CPU ;)

It's a little basic compared to something like Intel's VTune, but the price is right.

这个链接谈论Linux,但我在MSVC和C#中使用相同的技术。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM