On Thursday 21 April 2011, Damien CLAUDE wrote:
> Hi
> 
> When I launch callgrind with option --toggle-collect on a binary built
> from the source code below: valgrind --tool=callgrind
> "--toggle-collect=f1()" $BINARY
> I get the attached output file.
> 
> When it is opened with kcachegrind it looks like the Instruction
> Fetches ("Ir" column) is correct compared to a run without the
> --toggle-collect option (half the value without the --toggle-collect
> option).
> The "Count" column indicates one call to function f() but two calls to
> function g(), I would have expected only one call to g().

You are right.
Looks like a bug, yes. Can you file a bug report for that?

Thanks,
Josef

> Is it something expected ?
> 
> Thanks.
> 
> source code:
> 
> static void g()
> {
> ...
> }
> 
> static void f()
> {
>  g();
> }
> 
> static void f1()
> {
>    f();
> }
> 
> static void f2()
> {
>    f();
> }
> 
> int main() {
>    f1();
>    f2();
> }
> 



------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to