Hi, For the last day or two I having been trying to get Valgrind/Callgrind 3.6.1 to work on Centos Linux 5.5 using a simple Fibonacci C++ program(shown below). After compiling the program using g++ -g -o MatchUpAccurate MatchUpAccurate.cpp, we run: /home/frankc/DQTTest/valgrind-3.6.1/coregrind/valgrind --tool=callgrind --dump-instr=yes --simulate-cache=yes --collect-jumps=yes ./MatchUpAccurate.exe. Then we get an error message from callgrind(shown below).
A programmer sent me an email showing me that my test program is profiled correctly on Ubuntu. I received an email from a programmer yesterday who thinks the reason that callgrind is not able to profile my C++ program on Centos Linux Version 5.5 is because of an libc conflict. "what is the version of libc on the host? Is it a vm or physical? I guess it is gonna be a ABI/version conflict of libc. If you cannot figure it out, just report it. Chances are, a dev will be able to tell you in 5 seconds." In order to determine what version of libc is on the Centos Linux 5.5 host, I tried: rpm -qa | grep glibc. The answer was: glibc-devel-2.5-49.el5_5.7 glibc-2.5-49.el5_5.7 glibc-headers-2.5-49.el5_5.7 glibc-common-2.5-49.el5.
We were wondering if anyone has been able to run Valgrind/Callgrind 3.6.1 on Centos Linux 5.5? Thank you.
// Callgrind error message ==18130== Callgrind, a call-graph generating cache profiler ==18130== Copyright (C) 2002-2010, and GNU GPL'd, by Josef Weidendorfer et al. ==18130== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info ==18130== Command: ./MatchUpAccurate.exe ==18130== --18130-- warning: Pentium 4 with 12 KB micro-op instruction trace cache --18130-- Simulating a 16 KB I-cache with 32 B lines ==18130== For interactive control, run 'callgrind_control -h'. std::ios_base::Init::Init() BB# 215387 Callgrind: jumps.c:164 (new_jcc): Assertion '(0 <= jmp) && (jmp <= from->bb->cjmp_count)' failed. ==18130== at 0x3801E4C8: report_and_quit (m_libcassert.c:193) ==18130== by 0x3801E69C: vgPlain_assert_fail (m_libcassert.c:267) ==18130== by 0x3800FCD9: vgCallgrind_get_jcc (jumps.c:164) ==18130== by 0x38003534: vgCallgrind_push_call_stack (callstack.c:217) ==18130== by 0x38001FDB: vgCallgrind_setup_bbcc (bbcc.c:844) ==18130== by 0x6292A7E3: ??? sched status: running_tid=1 Thread 1: status = VgTs_Runnable ==18130== at 0x3E30CB0: std::ios_base::Init::Init() (in /usr/lib/libstdc++.so.6.0.8) ==18130== by 0x3EA0125: ??? (in /usr/lib/libstdc++.so.6.0.8) ==18130== by 0x3E22BD0: ??? (in /usr/lib/libstdc++.so.6.0.8) ==18130== by 0xAE2162: call_init (in /lib/ld-2.5.so) ==18130== by 0xAE2272: _dl_init (in /lib/ld-2.5.so) ==18130== by 0xAD484E: ??? (in /lib/ld-2.5.so)
// Test program MatchUpTest.cpp int fibonacci(int n){ if (n == 0) return 0; else if (n == 1) return 1; else return fibonacci(n - 1) + fibonacci(n-2); } int main(int Argc_,char *Argv_[]) {
fibonacci(10); return 1; }
On Fri, Apr 22, 2011 at 03:50:25PM -0400, Frank Chang wrote:
Hi, For the last day or two I having been trying to get Valgrind/Callgrind 3.6.1 to work on Centos Linux 5.5 using a simple Fibonacci C++ program(shown below). After compiling the program using g++ -g -o MatchUpAccurate MatchUpAccurate.cpp, we run: /home/frankc/DQTTest/valgrind-3.6.1/coregrind/valgrind --tool=callgrind --dump-instr=yes --simulate-cache=yes --collect-jumps=yes ./MatchUpAccurate.exe. Then we get an error message from callgrind(shown below).
... works for me x86_64 with compiled from source valgrind 3.6.1
[tru@liberte ~]$ g++ -g -o f f.cpp [tru@liberte ~]$ module load valgrind [tru@liberte ~]$ valgrind --tool=callgrind --dump-instr=yes --simulate-cache=yes --collect-jumps=yes ./f ==10998== Callgrind, a call-graph generating cache profiler ==10998== Copyright (C) 2002-2010, and GNU GPL'd, by Josef Weidendorfer et al. ==10998== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info ==10998== Command: ./f ==10998== ==10998== For interactive control, run 'callgrind_control -h'. ==10998== ==10998== Events : Ir Dr Dw I1mr D1mr D1mw ILmr DLmr DLmw ==10998== Collected : 1320456 328293 116346 1012 6964 1177 995 4029 894 ==10998== ==10998== I refs: 1,320,456 ==10998== I1 misses: 1,012 ==10998== LLi misses: 995 ==10998== I1 miss rate: 0.7% ==10998== LLi miss rate: 0.7% ==10998== ==10998== D refs: 444,639 (328,293 rd + 116,346 wr) ==10998== D1 misses: 8,141 ( 6,964 rd + 1,177 wr) ==10998== LLd misses: 4,923 ( 4,029 rd + 894 wr) ==10998== D1 miss rate: 1.8% ( 2.1% + 1.0% ) ==10998== LLd miss rate: 1.1% ( 1.2% + 0.7% ) ==10998== ==10998== LL refs: 9,153 ( 7,976 rd + 1,177 wr) ==10998== LL misses: 5,918 ( 5,024 rd + 894 wr) ==10998== LL miss rate: 0.3% ( 0.3% + 0.7% ) [tru@liberte ~]$ rpm -q glibc glibc-devel glibc-2.5-58.el5_6.2.x86_64 glibc-2.5-58.el5_6.2.i686 glibc-devel-2.5-58.el5_6.2.x86_64 glibc-devel-2.5-58.el5_6.2.i386