C++ Code Profiler

前端 未结 11 1581
独厮守ぢ
独厮守ぢ 2020-12-08 11:32

Can anybody recommend a good code profiler for C++?

I came across Shiny - any good? http://sourceforge.net/projects/shinyprofiler/

相关标签:
11条回答
  • 2020-12-08 11:44

    If you have access to a Mac, then I recommend using Shark from the CHUD tools.

    0 讨论(0)
  • 2020-12-08 11:46

    Not C++ specific, but AMD's CodeAnalyst software is free and is feature-packed.

    http://developer.amd.com/cpu/codeanalyst/codeanalystwindows/Pages/default.aspx

    0 讨论(0)
  • 2020-12-08 11:48

    If you cannot locate DevPartner it is because we've moved under new ownership. Check us out on the Micro Focus website: http://www.microfocus.com/products/micro-focus-developer/devpartner/index.aspx. Shameless plug: I work on the DevPartner team. Our long awaited 64-bit versions of BoundsChecker and C++/.NET profilers ship on February 4, 2011. We've changed our pricing model so you can choose either the whole suite or just the performance profiler if that's what you need. Please check out the new DPS 10.5 release when it goes live!

    0 讨论(0)
  • 2020-12-08 11:49

    Depends on what you need to do:

    1. Measure, so you can do regressions testing to see if changes in performance happened.
    2. Find reasons for suboptimal performance and optimize them.

    These are not the same.

    For 1, use one of the recommended profilers.

    For 2, the profiler I much prefer is one you already have:
    http://www.wikihow.com/Optimize-Your-Program%27s-Performance
    To see how this goes, check this out.

    For C++, as for C# and any language that encourages layers of abstraction, those layers may or may not be good from a software engineering standpoint, but they can kill performance. Every method call is a detour in the execution of your program, and the style encourages you to nest those things, sometimes needlessly. Also the style discourages you from knowing or caring what goes on inside them. You may find them creating and deleting objects underneath at a rate and level of generality far beyond what your application really needs.

    0 讨论(0)
  • 2020-12-08 11:50

    If you are running a Premium version of VS 2010 then you get a profiler with it.

    I've also used a couple of other free ones, but they don't compare to the on MS ships. Useful as a second opinion though.

    0 讨论(0)
  • 2020-12-08 11:56

    Probably you will be interested in Intel VTune. Rather useful and allows to collect low-level events like cache misses which helps a lot in tuning.

    0 讨论(0)
提交回复
热议问题