|
From: Mahmood N. <nt_...@ya...> - 2013-04-19 04:52:45
|
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 |
|
From: Josef W. <Jos...@gm...> - 2013-04-19 08:25:24
|
Am 19.04.2013 06:52, schrieb Mahmood Naderan: > It seems that callgrind can not instrument a program that runs on top of > another program. This is not specific to callgrind. By default, child processes of a process controlled by Valgrind will not be run within Valgrind themself. If you want that, add "--trace-children=yes". Josef |
|
From: Mahmood N. <nt_...@ya...> - 2013-04-19 10:26:10
|
>By default, child processes of a process controlled by Valgrind will >not be run within Valgrind themself. If you want that, add >"--trace-children=yes". Thank you very much Regards, Mahmood ________________________________ From: Josef Weidendorfer <Jos...@gm...> To: val...@li... Sent: Friday, April 19, 2013 12:55 PM Subject: Re: [Valgrind-users] using callgrind for nested programs Am 19.04.2013 06:52, schrieb Mahmood Naderan: > It seems that callgrind can not instrument a program that runs on top of > another program. This is not specific to callgrind. By default, child processes of a process controlled by Valgrind will not be run within Valgrind themself. If you want that, add "--trace-children=yes". Josef ------------------------------------------------------------------------------ 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 Val...@li... https://lists.sourceforge.net/lists/listinfo/valgrind-users |