|
From: Josef W. <Jos...@gm...> - 2006-03-01 09:32:29
|
On Wednesday 01 March 2006 10:02, Chris Jones wrote: > Hi, > > > Callgrind uses demangled names for C++, which contains the full signature, > > i.e. in your case for example > > A::foo(int) > > Does it work with "--dump-before=A::foo*" ? > > If not, this is probably a bug... > > 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? > I am sure turning on optimisation will confuse some things for the > optimiser Which optimizer do you talk about here? > (i.e. if A::foo is inlined), so I am perhaps not too surprised > at this. Incidently, does callgrind "officially" profiling with > optimisation, 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. 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). Josef |