Hi.
I am new to valgrind and want to use it to find memory leak.
I have a program that is multi-process, however , we do not call exec after
calling fork.
I have tried to use the --trace-children=yes option along with
-log-file=/tmp/test.%p option.
so the complete command looks like

valgrind -v --trace-children=yes -log-file=/tmp/test.%p --leak-check=full
--num-callers=40 ./<process_name> -process_args..

When I start the process , I only get on log file for the parent process and
whatever child processes are forked do not create a new log file.
also, I was hoping that the output from the child may be is being directed
to the root processes log file, however, then the root processe's log does
not have the Process ID of the child processes but just of the root
process.

Is there a way to have per process log when you are not calling exec or if
there is no way to do that, then atleast print the correct process ID in the
one log file.


I am using valgrind on redhat enterprise linux 5.
The version of valgrind is 3.5.0

thanks
Mohnish
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to