What are some good profilers for native C++ on Win

2019-01-14 03:19发布

问题:

I'm looking for a profiler to use with native C++. It certainly does not have to be free, however cost does factor into the purchase decision. This is for commercial work so I can't use personal or academic licensed copies.

The key features I'm looking for are:

  • Process level metrics
  • Component level metrics
  • Line-level metrics
  • Supports Multi-threaded code
  • Usability
  • Cost
  • Visual Studio 2005 Professional support required (VS 2008 Professional support highly desirable)

I've used Intel's VTune and Compuware's Devpartner Performance Analysis Community Edition.

VTune seemed very powerful but it has a steep learning curve. It also is very "modular" so you have to figure out what parts are you need to buy.

DevPartner PACE was pretty easy to use and provides all of the key features however it's only a 45-day trial. The licensed version (DevPartner for Visual C++ BoundsChecker Suite) is about $1400 a seat, which is doable but a bit high imo.

What are some good profilers for native C++ and WHY?


See also:

What's Your Favorite Profiling Tool For C++

回答1:

On Windows, GlowCode is affordable, fairly easy to use, and offers a free trial so you can see if it works for you.



回答2:

Many people are not aware but MSFT is making a great progress putting the best possible tools for improving performance in the hands of devlopers for free :-). They are exposing to all of us the internals of Windows tracing: ETW.

perftools

It is part of the new windows SDK for server 2008 and Vista. Simply impressive and must to download if performance analysis and profiling under Windows is your goal (regardless of language).

Check the documentation here before you decide to download it:

msdn doc



回答3:

Try Intel Parallel Studio. Currently, it's in beta, but the name Intel says it all.

http://www.intel.com/go/parallel



回答4:

Just found Luke StackWalker on SourceForge (http://lukestackwalker.sourceforge.net/). Unfortunately it does not have a 'focus on sub tree', but it remains handy to use, uses the symbol server (I suggest you set it up immediately if you don't have it yet), offers a graphical visualisation, ...

The down side is that it doesn't show the accumulated times (samples) of the child functions.

Another alternative is "Very Sleepy" (http://www.codersnotes.com/sleepy). It can show the accumulated times of the children, but unfortunately it doesn't use the symbol server.



回答5:

CodeXL may also be worth looking at, it can run on both Linux and Windows, although it is mainly dedicated to OpenGL/OpenCL debugging and profiling there is a time based sample option for CPUs under the profiling section which maybe helpful. It's also free and works as long as pdb files are available (well on windows, I don't know how it works on Linux) (even for release builds with pdb).



回答6:

Definitely Visual Studio Team System. By far.



回答7:

I wrote an open source lightweight win32/64 profiler, support both CPU and memory profiling, it's kind of similar with VS profiler, but with unique feature like flame graph of CPU and memory data. it's here: dprofiler



回答8:

I just finished the first usable version of CxxProf, a portable manual instrumented profiling library for C++.

It fulfills your requirements:

  • Profiles multithreaded applications
  • Support for profiling multiple processes throughout the same network is on the way
  • It is written with the best usability and easiest integration in mind
  • It's free as in beer and free as in speech
  • It will work with VS05,08,10,12 and 13. As well as with g++ on Linux. It's currently tested with VS 2013 Express.

See the project wiki for more info.

Disclaimer: Im the main developer of CxxProf