简体   繁体   English

如何在Windows下配置文件?

[英]How to profile under Windows?

I have a C++ program that I want to profile as it needs too much running time. 我有一个要分析的C ++程序,因为它需要太多的运行时间。

Im am using windows for this program and I'd like to use a free profiler. 我正在为该程序使用Windows,我想使用免费的探查器。 I searched the net and found the AMD CodeAnalyst and very sleepy . 我上网搜索,发现AMD CodeAnalyst very sleepy The AMD tool does not work very good as I have an intel CPU. 因为我有Intel CPU,所以AMD工具不能很好地工作。 So nearly no information is coming out. 因此几乎没有信息出来。

When using very sleepy , I have the problem, that I do not see the names of the functions in the summary. 使用very sleepy ,我遇到了问题,即在摘要中看不到函数的名称。 That means: The profiling itself works, but I cannot see what function took how long. 这意味着:分析本身可以工作,但是我看不到哪个函数花了多长时间。 I see just something like [123456789] as function name and 0 as line number. 我看到像[123456789]这样的函数名称,而0是行号。 I think this is a problem of the debugging symbols. 我认为这是调试符号的问题。

Can you tell me, what I have to do to get it working (Visual Studio 2010)? 您能告诉我,要使其正常工作必须做什么(Visual Studio 2010)?

Thanks 谢谢

I've tried a number of them, including LTProf and ANTS, but I keep going back to this method . 我已经尝试了其中的许多方法,包括LTProf和ANTS,但我一直回到这种方法 It's not a tool; 它不是工具; it's just a technique. 这只是一种技术。 Here's a step-by-step example of using it. 这是使用它的分步示例 A lot of other people also use it, if you want links. 如果需要链接,很多其他人也会使用它。

There are two kinds of profiler. 有两种探查器。

The non-intrusive kind, which do not require modification to your code. 非侵入性类型,不需要修改您的代码。 IMHO these do not provide satisfactory results, although they are easier to use. 恕我直言,尽管它们更易于使用,但它们不能提供令人满意的结果。

The intrusive kind, which require additions to your code. 侵入式,需要添加代码。 These provide better results, I think. 我认为这些可以提供更好的结果。 I developed my own profiler of this kind, which has received good reviews. 我开发了自己的此类探查器,并获得了好评。 You can check it out at http://ravenspoint.wordpress.com/2010/06/16/timing/ 您可以在http://ravenspoint.wordpress.com/2010/06/16/timing/查看。

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

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