Hi
It seems that callgrind can not instrument a program that runs on top of 
another program. Consider this case:
1- I run a tcl script to launch a program
   
[mahmood@mpc /home/mahmood/trunk]$ scripts/run_job -job test -valgrind benchmark

"-valgrind" will set "valgrind --tool=callgrind"

2- this script will launch a program which is not mine. I mean this is a 
released 3rd party program which enters a console
[mahmood@mpc /home/mahmood/trunk]$ scripts/run_job -job test -valgrind benchmark
....
Loading ...
sim>

3- Reaching this console will takes about 10 seconds. Once I see the console, I 
also see some callgrind.out.XXX files.

4- At this point I will load my module:
sim> load-module flex
sim> continue 100000

5- The continue command will run my code for specified cycles. This will take 
about 30 seconds and I see the outputs of my code.

6- Once my program finishes, I quit the main program
sim> load-module flex
sim> continue 100000
....
done!
sim> quit

7- However the size of the callgrind.out.XXX files had no change. That shows 
callgrind didn't instrument my own code. Instead it instrumented the top 
program which is compiled in release mode. So kcachegrind doesn't show useful 
information.

Any feedback is welcomed.
 
Regards,
Mahmood
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to