Windows 上本机 C++ 的一些好的分析器有哪些?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/153559/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 11:20:58  来源:igfitidea点击:

What are some good profilers for native C++ on Windows?

c++windowsperformanceprofiling

提问by Zach Burlingame

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.

我正在寻找与本机 C++ 一起使用的分析器。它当然不一定是免费的,但成本确实会影响购买决定。这是用于商业工作,所以我不能使用个人或学术许可的副本。

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)
  • 流程级指标
  • 组件级指标
  • 线级指标
  • 支持多线程代码
  • 可用性
  • 成本
  • 需要 Visual Studio 2005 Professional 支持(非常需要 VS 2008 Professional 支持)

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

我使用过 Intel 的 VTune 和 Compuware 的 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.

VTune 看起来非常强大,但它有一个陡峭的学习曲线。它也非常“模块化”,因此您必须弄清楚需要购买哪些部件。

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.

DevPartner PACE 非常易于使用并提供所有关键功能,但它只有 45 天的试用期。许可版本(Visual C++ BoundsChecker Suite 的 DevPartner)每席约 1400 美元,这是可行的,但有点高。

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

什么是本机 C++ 的一些好的分析器以及为什么



See also:

也可以看看:

What's Your Favorite Profiling Tool For C++

你最喜欢的 C++ 分析工具是什么

采纳答案by AShelly

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

在 Windows 上,GlowCode价格实惠,相当易于使用,并提供免费试用,以便您了解它是否适​​合您。

回答by antonio

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.

许多人不知道,但 MSFT 正在取得巨大进步,将可提高性能的最佳工具免费提供给开发人员:-)。他们向我们所有人展示了 Windows 跟踪的内部结构: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).

它是适用于 server 2008 和 Vista 的新 Windows SDK 的一部分。如果在 Windows 下进行性能分析和分析是您的目标(无论语言如何),那么令人印象深刻并且必须下载。

Check the documentation here before you decide to download it:

在您决定下载之前,请检查此处的文档:

msdn doc

msdn 文档

回答by sivabudh

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

试试英特尔 Parallel Studio。目前,它处于测试阶段,但英特尔的名字已经说明了一切。

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

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

回答by Patrick

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, ...

刚刚在 SourceForge ( http://lukestackwalker.sourceforge.net/)上找到了 Luke StackWalker 。不幸的是,它没有“专注于子树”,但它仍然易于使用,使用符号服务器(如果你还没有它,我建议你立即设置它),提供图形可视化,......

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.

另一种选择是“非常困”(http://www.codersnotes.com/sleepy)。它可以显示孩子的累计次数,但遗憾的是它没有使用符号服务器。

回答by afree100

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).

CodeXL 可能也值得一看,它可以在 Linux 和 Windows 上运行,尽管它主要致力于 OpenGL/OpenCL 调试和分析,但在分析部分下有一个基于时间的 CPU 示例选项,这可能会有所帮助。它也是免费的并且只要 pdb 文件可用就可以工作(在 Windows 上,我不知道它在 Linux 上是如何工作的)(即使对于使用 pdb 的发布版本)。

回答by MOnsDaR

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

我刚刚完成了CxxProf的第一个可用版本,是一个用于 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.
  • Profiles 多线程应用程序
  • 即将支持在同一网络中分析多个进程
  • 它的编写考虑到了最佳的可用性和最简单的集成
  • 它像啤酒一样免费,像言论一样免费
  • 它适用于 VS05、08、10、12 和 13。以及 Linux 上的 g++。它目前已使用 VS 2013 Express 进行测试。

See the project wikifor more info.

有关更多信息,请参阅项目 wiki

Disclaimer: Im the main developer of CxxProf

免责声明:我是 CxxProf 的主要开发者

回答by xwlan

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

我写了一个开源的轻量级 win32/64 分析器,支持 CPU 和内存分析,它有点类似于 VS 分析器,但具有 CPU 和内存数据的火焰图等独特功能。它在这里: dprofiler

回答by Alex Budovski

Definitely Visual Studio Team System. By far.

绝对是 Visual Studio 团队系统。到目前为止。