如何在 Centos Linux 5.5 上使用 callgrind
我正在尝试使用 callgrind 分析器来分析我的 C++ 程序。我在 Intel 32 位处理器上的 Linux Centos 版本 5.5 上使用 Valgrind 版本 3.6,1。当我尝试分析我的程序时,我不断收到以下错误(如下所示)。 我已经使用过 Linux gprof,但它没有提供任何有用的分析信息。请告诉我我做错了什么或者我应该使用什么解决方法。谢谢
valgrind --tool=callgrind --dump-instr=yes --simulate-cache-yes --collect-jumps=yes ./MatchUpAccurate.exe -输入/home/frankc/DQTTest5/MatchUpTest/TestData/mdata2003.dbf -fileloc /home/frankc/DQTTest5/MatchUpTest/TestData -version 15,
==25558== Callgrind,一个调用图生成缓存分析器, ==25558== 版权所有 (C) 2002-2010,和 GNU GPL,作者:Josef Weidendorfer 等人, ==25558== 使用 Valgrind-3.6.1 和 LibVEX;使用 -h 重新运行以获取版权信息, ==25558==命令:./MatchUpAccurate.exe -input /home/frankc/DQTTest5/MatchUpTest/TestData/mdata2003.dbf -fileloc /home/frankc/DQTTest5/MatchUpTest/TestData -版本 15, ==25558==, ==25558== 对于交互式控制,运行“callgrind_control -h”。, 内存复制, BB# 486126,
Callgrind:jumps.c:164(new_jcc):断言'(0 <= jmp)&& (jmp <= from->bb->cjmp_count)' 失败。, ==25558==位于0x3801E4C8:report_and_quit(m_libcassert.c:193), ==25558==由0x3801E69C:vgPlain_assert_fail(m_libcassert.c:267), ==25558==由0x3800FCD9:vgCallgrind_get_jcc(jumps.c:164), ==25558==由0x38003534:vgCallgrind_push_call_stack(callstack.c:217), ==25558==由0x38001FDB:vgCallgrind_setup_bbcc(bbcc.c:844), ==25558== 由 0x629B9E93: ???,
计划状态:, running_tid=1,
线程 1:状态 = VgTs_Runnable, ==25558==在0xB64A30:memcpy(在/lib/libc-2.5.so中), ==25558== 0xC845D3:__pthread_initialize_minimal(在/lib/libpthread-2.5.so中), ==25558== 0xC84217:??? (在/lib/libpthread-2.5.so中), ==25558== 0xC83DA7:??? (在/lib/libpthread-2.5.so中), ==25558== by 0xAE2162:call_init(在/lib/ld-2.5.so中), ==25558== by 0xAE228F:_dl_init(在/lib/ld-2.5.so中), ==25558== 0xAD484E:??? (在/lib/ld-2.5.so中),
注意:另请参阅源代码分发中的常见问题解答。 它包含几个常见问题的解决方法。 特别是,如果 Valgrind 在之后中止或崩溃, 找出程序中的问题,很有可能, 解决这些问题将防止 Valgrind 中止或崩溃, 特别是如果它发生在 m_mallocfree.c 中,
如果这没有帮助,请将此错误报告到:www.valgrind.org,
在错误报告中,发送所有上述文本,valgrind, 版本,以及您使用的操作系统和版本。谢谢。
I am trying to use the callgrind profiler to profile my C++ program. I am using Valgrind version 3.6,1 on Linux Centos Version 5.5 on a Intel 32-bit processor. I keep getting the following error(shown below) when I try to profile my program.
I already used Linux gprof but it didn't provide any useful profiling information. Please tell me what I am doing wrong or what workaround I should use. Thank you
valgrind --tool=callgrind --dump-instr=yes --simulate-cache-yes --collect-jumps=yes
./MatchUpAccurate.exe -input /home/frankc/DQTTest5/MatchUpTest/TestData/mdata2003.dbf
-fileloc /home/frankc/DQTTest5/MatchUpTest/TestData -version 15,
==25558== Callgrind, a call-graph generating cache profiler,
==25558== Copyright (C) 2002-2010, and GNU GPL'd, by Josef Weidendorfer et al.,
==25558== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info,
==25558== Command: ./MatchUpAccurate.exe -input /home/frankc/DQTTest5/MatchUpTest/TestData/mdata2003.dbf -fileloc /home/frankc/DQTTest5/MatchUpTest/TestData -version 15,
==25558==,
==25558== For interactive control, run 'callgrind_control -h'.,
memcpy,
BB# 486126,
Callgrind: jumps.c:164 (new_jcc): Assertion '(0 <= jmp) && (jmp <= from->bb->cjmp_count)' failed.,
==25558== at 0x3801E4C8: report_and_quit (m_libcassert.c:193),
==25558== by 0x3801E69C: vgPlain_assert_fail (m_libcassert.c:267),
==25558== by 0x3800FCD9: vgCallgrind_get_jcc (jumps.c:164),
==25558== by 0x38003534: vgCallgrind_push_call_stack (callstack.c:217),
==25558== by 0x38001FDB: vgCallgrind_setup_bbcc (bbcc.c:844),
==25558== by 0x629B9E93: ???,
sched status:,
running_tid=1,
Thread 1: status = VgTs_Runnable,
==25558== at 0xB64A30: memcpy (in /lib/libc-2.5.so),
==25558== by 0xC845D3: __pthread_initialize_minimal (in /lib/libpthread-2.5.so),
==25558== by 0xC84217: ??? (in /lib/libpthread-2.5.so),
==25558== by 0xC83DA7: ??? (in /lib/libpthread-2.5.so),
==25558== by 0xAE2162: call_init (in /lib/ld-2.5.so),
==25558== by 0xAE228F: _dl_init (in /lib/ld-2.5.so),
==25558== by 0xAD484E: ??? (in /lib/ld-2.5.so),
Note: see also the FAQ in the source distribution.,
It contains workarounds to several common problems.,
In particular, if Valgrind aborted or crashed after,
identifying problems in your program, there's a good chance,
that fixing those problems will prevent Valgrind aborting or, crashing,
especially if it happened in m_mallocfree.c.,
If that doesn't help, please report this bug to: www.valgrind.org,
In the bug report, send all the above text, the valgrind,
version, and what OS and version you are using. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
晚上好,我收到了 Callgrind 工程师 Josef Weidenorfer 发来的电子邮件。 Josef 给我发了一个 valgrind/callgrind 补丁来解决我的 callgrind 问题。这是补丁(如下所示)。我刚刚应用了补丁并重建了 valgrind/callgrind。现在 callgrind 可以在 Centos Linux 5.5 上分析 fibonacci(25) 函数。谢谢。
Good evening, I received an email from the Callgrind Engineer, Josef Weidenorfer. Josef sent me a valgrind/callgrind patch to fix my callgrind problem. Here is the patch(shown below). I just applied the patch and rebuilt valgrind/callgrind. Now callgrind can profile the fibonacci(25) function on Centos Linux 5.5. Thank you.