frame_dummy在概要分析的上下文中是什么意思? [英] What does frame_dummy mean in the context of profiling?

查看:2186
本文介绍了frame_dummy在概要分析的上下文中是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用gprof的个人资料我已经写了一个C ++程序的过程中,我注意到,绝大多数的执行时间花费在函数frame_dummy。更精确地说,在从gprof的输出的平的轮廓的第一项表示在花费采样时间76.38%和24611191调用具有名称frame_dummy的函数。

In the process of using gprof to profile a C++ program I've written, I've noticed that the vast majority of execution time is spent in the function "frame_dummy". More precisely, the first entry in the flat profile from the output of gprof shows 76.38% of sample time spent in and 24611191 calls to a function with name frame_dummy.

在短,我想了解双方frame_dummy指的是什么 - 因为我没有命名为这样的功能 - 以及这是什么意思我的优化工作。

In short, I am trying to understand both what frame_dummy refers to -- as I do not have any function named as such -- as well as what this means for my optimization efforts.

虽然它不太可能是相关的,我要补充这个计划的目的是利用多重网格算法求解泊松方程,并采用MPI并行任务。然而,尽管存在MPI函数调用,但是上面提到的gprof输出来源于仅运行单个进程。我还应该注意,我的程序没有依赖关系,除了MPI和使用g ++ 4.6.1编译。

Though it is unlikely to be relevant, I should add that this program is designed to solve Poisson's equation using the multigrid algorithm, and employs MPI to parallelize the task. However, though MPI function calls are present, the gprof output mentioned above is derived from running only a single process. I should also note that my program has no dependencies aside from MPI and was compiled with g++ 4.6.1.

推荐答案

很好的解释在这里: http://dbp-consulting.com/tutorials/debugging/linuxProgramStartup.html 。但我不知道为什么你的程序会花那么多时间在frame_dummy,或者为什么它会被调用很多次。

There's a very good explanation here: http://dbp-consulting.com/tutorials/debugging/linuxProgramStartup.html . But I'm not sure why your program would spend so much time in frame_dummy, or why it would get called so many times.

也许在您的二进制文件的调试信息是在某种程度上腐败,或者被gprof误读?或者gprof可能会被MPI所困惑?这里有一些尝试:在gdb中运行程序,并在frame_dummy函数上使用断点。看它是否真正得到所谓的2400万次,如果确实如此,那么什么是取得调用。

Perhaps the debug info in your binary is corrupt in some way, or is getting misread by gprof? Or gprof might get confsued by MPI? Here's something to try: run your program in gdb, and with a breakpoint on the frame_dummy function. See whether it really gets called 24 million times, and if it does, then what it's getting called from.

另外,你能确认这是crtbegin的frame_dummy。 o,而不是其他frame_dummy?

Also, can you confirm that this is the frame_dummy in crtbegin.o, and not some other frame_dummy?

这里是the源在crtbegin.c frame_dummy - 由我的代码读取,它应该只被调用一次

Here's the source for frame_dummy in crtbegin.c -- by my reading of the code, it should only get called once.

此外,我假设你的程序运行并产生正确的结果? (特别是,如果你的程序有一个内存错误,那么你可以得到一些奇怪的行为。)

Also, I'm assuming that your program runs and produces the correct result? (In particular, if there's a memory bug in your program, then you can get some pretty odd behavior.)

这篇关于frame_dummy在概要分析的上下文中是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆