frame

编程入门 行业动态 更新时间:2024-10-28 10:29:08
本文介绍了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.

推荐答案

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

There's a very good explanation here: dbp-consulting/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

本文发布于:2023-10-08 14:15:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1472870.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:frame

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!