简体   繁体   English

用于C ++分析的非常困和Callgrind之间的区别

[英]Difference between Very sleepy and Callgrind for C++ profiling

I am trying to learn the difference between Very Sleepy and Callgrind for profiling. 我试图了解Very SleepyCallgrind之间的区别。 The code that I intend to profile is written in C++ and works under both Linux and Windows. 我打算分析的代码是用C ++编写的,可以在Linux和Windows下运行。

On Linux, I was able to use Callgrind to look at the Self and inclusive relative costs. 在Linux上,我能够使用Callgrind来查看自我和包容性相对成本。 From what I understand, Callgrind uses instrumented profiling technique and takes considerable time. 根据我的理解,Callgrind使用仪表化分析技术并花费大量时间。 However, Very Sleepy uses statistical profiling and is very quick. 但是,Very Sleepy使用统计分析并且非常快。 Since both uses different approaches to profiling, I cannot compare the results from the two. 由于两者都使用不同的分析方法,我无法比较两者的结果。

Is there a way that I can do some sort of profile comparison on both Linux and Windows? 有没有办法可以在Linux和Windows上进行某种配置文件比较? Unfortunately, Callgrind is unavailable for Windows and vice versa for Very Sleepy. 不幸的是,Callgrind不能用于Windows,反之亦然。

No. Such a comparison is between two unlike things. 不。这种比较是两种不同的事情。 Use sampling when to get accurate profiling you cannot afford overhead. 使用抽样何时获得准确的分析,您无法负担开销。 Use instrumentation when you need to understand control flow over time. 当您需要了解控制流量时,请使用检测。

Although, I couldn't get the answer for the first question. 虽然,我无法得到第一个问题的答案。 I have found a new tool that works on both Windows and Linux for C++ code profiling. 我找到了一个适用于Windows和Linux的新工具,用于C ++代码分析。 Its called as CodeXL from AMD and its free. 它被称为AMD的CodeXL及其免费版。

http://developer.amd.com/tools-and-sdks/opencl-zone/codexl/ http://developer.amd.com/tools-and-sdks/opencl-zone/codexl/

Bonus if you have AMD processors or Catalyst graphics processors as some of the other capabilities of the tool becomes available. 如果您拥有AMD处理器或Catalyst图形处理器,则会获得额外奖励,因为该工具的某些其他功能可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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