Thanks Tom... Your suggestion helped me :) Thanks, Prashant
-----Original Message----- From: Tom Hughes [mailto:t...@compton.nu] Sent: 06 April 2016 18:00 To: PRASHANT PATEL; valgrind-users@lists.sourceforge.net Subject: Re: Is is possible to use "valgrind --tool=callgrind" command in "excelp" call On 06/04/16 13:09, PRASHANT PATEL wrote: > I would like to use "valgrind -tool=callgrind > <executive name>" in "execlp()" system call as below. Is it possible ? > > For me, valgrind is not invoking up. > > execlp("/usr/local/pmas/bin/pma", "valgrind --tool=callgrind pma", > "-n", option_pma_name, NULL); > > Is it any other way to do it ? Well that's completely wrong is why... You are trying to exec the wrong executable and have merged several arguments into one. You want: execlp("/path/to/valgrind", "valgrind", "--tool=callgrind", "/usr/local/pmas/bin/pma", "-n", option_pma_name, NULL); So you are running valgrind, and providing the arguments that valgrind needs including the path to the program it needs to start. Tom -- Tom Hughes (t...@compton.nu) http://compton.nu/ ------------------------------------------------------------------------------ _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users