|
From: Chris J. <jo...@he...> - 2006-03-01 14:32:12
|
J >>The problem was I use -O2, and in this case "--dump-before=A::foo*" does >>not work. I managed to get it working in my case with >>"--dump-before=*A*foo*". > > > I do not understand. > You compiled your program so that A::foo got inlined by the compiler? > If a function is inlined, it does not appear in the symbol table, so > Callgrind will not see it, ie. it of course also will _not_ be catched > by something like "*A*foo*". I suppose you have a similar named function > which is not inlined and which was catched instead? No, A::foo is a not an inlined function. Of course inline functions are not seen. So, to clarify. A::foo is not inlined. Without -O2 (gcc) "--dump-before=A::foo*" works fine. With -O2 it does not, but does work if I change it to "--dump-before=*A*foo*" > Which optimizer do you talk about here? gcc and -O2 (gcc 3.2.3) Redhat EL3 (technically a derivative called SLC3) > I again do not understand this question. > Of course, for profiling, your target code should be compiled in the > same way you would use for a release of your binary. Otherwise, profiling > results will be skewed, ie. not useful. Exactly, thats why I was trying with -O2 :) > > Options like --dump-before are probably only useful after a first round of > full profiling, so you see the functions available (and which ones are not > because of inlining). Yes. I agree In this case though, I am using the option for another reason. I am actually trying to profile a very large program, which repeats the same calculations many times. A::foo is the top level method, so by doing this I get one dump per calculation. If I don't do this the callgrind dump file is huge and kcachegrind needs massive amounts of memory to view the file (almost 1G). cheers Chris > > Josef > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users -- +--------------------------------------------------------------+ | Dr Chris R Jones work : +44 (0)1223 337324 | | HEP Group (rm 882) fax : +44 (0)1223 353920 | | Cavendish Laboratory, home : +44 (0)1223 510711 | | Madingley Road, mobile : +44 (0)7723 327477 | | Cambridge, CB3 0HE email : jo...@he... | +--------------------------------------------------------------+ |