|
From: Irek S. <ij...@ii...> - 2005-10-05 22:43:08
|
I have a question on the massif tool. I am using Valgrind v. 2.2.0 on Fedora 3, Linux 2.6.10. When I run my program with Valgrind with the massif tool, I get this results: > ==5848== Total spacetime: 0 ms.B > ==5848== heap: (n/a) > ==5848== heap admin: (n/a) > ==5848== stack(s): 0% The file massif.5848.txt has: > Command: ./simone > > (No heap memory allocated) And the image massif.5848.ps has a blank plot. I used massif before with the same code and got some results. What am I doing wrong this time? Thanks for reading! Best, Irek |
|
From: Paul P. <ppl...@gm...> - 2005-10-06 02:08:02
|
On 10/5/05, Irek Szczesniak <ij...@ii...> wrote: > > > I used massif before with the same code and got some results. What am > I doing wrong this time? Probably linking with libc.a or linking static malloc() implementation from some other library. What does 'nm simone | grep malloc' report? Cheers, |
|
From: Irek S. <ij...@ii...> - 2005-10-06 02:34:06
|
Thank you, Paul, for your reply. Paul Pluzhnikov wrote: >> I used massif before with the same code and got some results. What >> am I doing wrong this time? > > Probably linking with libc.a or linking static malloc() > implementation from some other library. > What does 'nm simone | grep malloc' report? This command returns nothing, because I am not using malloc. The program is written in C++. The command 'nm -C simone | grep new' returns among other things this: > U operator new[](unsigned int) > U operator new(unsigned int) > 0804ba90 W operator new(unsigned int, void*) The command 'ldd simone' says: > libdmallocxx.so => /usr/lib/libdmallocxx.so (0x00c79000) > libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x009e0000) > libm.so.6 => /lib/tls/libm.so.6 (0x006d7000) > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00aad000) > libc.so.6 => /lib/tls/libc.so.6 (0x005ab000) > /lib/ld-linux.so.2 (0x00591000) But 'nm -C /usr/lib/libstdc++.so.6' says: > nm: /usr/lib/libstdc++.so.6: no symbols which is a new thing on me. Thanks & best, Irek |
|
From: Paul P. <ppl...@gm...> - 2005-10-06 03:07:17
|
On 10/5/05, Irek Szczesniak <ij...@ii...> wrote: > > Paul Pluzhnikov wrote: > > > Probably linking with libc.a or linking static malloc() ... > > What does 'nm simone | grep malloc' report? > > This command returns nothing, because I am not using malloc. The > program is written in C++. Well, this definitely confirms that you are *not* linking static malloc. The command 'ldd simone' says: > > > libdmallocxx.so =3D> /usr/lib/libdmallocxx.so (0x00c79000) Interesting. Perhaps libdmallocxx.so somehow iterferes with VG operation? [It doesn't appear to affect my VG-2.4 on a trivial test case, but you can try linking without it and see if things improve.] But 'nm -C /usr/lib/libstdc++.so.6' says: > > > nm: /usr/lib/libstdc++.so.6: no symbols > > which is a new thing on me. It's been stripped. It still has a dynamic symbol table though, which you can examine with "nm -D /usr/lib/libstdc++.so.6". Cheers, |
|
From: Irek S. <ij...@ii...> - 2005-10-06 04:28:39
|
> Interesting. Perhaps libdmallocxx.so somehow iterferes with VG > operation? [It doesn't appear to affect my VG-2.4 on a trivial test > case, but you can try linking without it and see if things improve.] Yes, the library did interfere. When I removed the library, then VG worked fine again. My apologies: I did use dmalloc to check my code, and then I forgot to remove "-ldmallocxx" from my Makefile. > It's been stripped. It still has a dynamic symbol table though, > which you can examine with "nm -D /usr/lib/libstdc++.so.6". This is useful information. Thanks. Paul, many thanks for responding to my post, and helping with the problem. Best, Irek |