Bug 148932

Summary: give more control over what is traced by --trace-children
Product: [Developer tools] valgrind Reporter: Bill Hoffman <bill.hoffman>
Component: generalAssignee: Nicholas Nethercote <njn>
Status: RESOLVED FIXED    
Severity: wishlist CC: jseward, kdebugzilla, njn
Priority: NOR    
Version: 3.2.3   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: add --trace-children-skip option
path, updated to curr trunk, & supporting darwin/aix5 execve too
patch, updated to allow use of ? and * wildcards

Description Bill Hoffman 2007-08-17 16:05:34 UTC
Version:           3.2.3 (using KDE Devel)
Installed from:    Compiled sources
OS:                Linux

I would like to propose a new option for valgrind.   --trace-children-skip=prog1,prog2.
I am using valgrind for testing cmake www.cmake.org.   I use the --trace-children option,
because the tests run ctest which runs cmake, but the tests also end up running make, /bin/sh,
gcc, and a bunch of other tools I have no interest in doing memchecks for.  I will attach the patch.
Comment 1 Bill Hoffman 2007-08-17 16:06:30 UTC
Created attachment 21422 [details]
add --trace-children-skip option
Comment 2 Bill Hoffman 2007-08-23 17:37:19 UTC
To be more flexible, it might be better to search for the string after the last / in the program being run.   Then use that in the search as well.  So, you don't have to list the full path to the program you don't want traced.  Something like this: 
 
  Char* program = VG_(strrchr)((Char*)ARG1, '/');
   if(program) program++; // move to first char past /
   VG_(message)(Vg_UserMsg, "program %s %s \n", ARG1, program);
   if(VG_(strstr)(VG_(clo_trace_children_skip), (Char*)ARG1)||
     program && VG_(strstr)(VG_(clo_trace_children_skip), program)) {
Comment 3 Nicholas Nethercote 2009-06-29 06:55:15 UTC
I wrote a design proposal for this here, which drew some comments:

http://blog.mozilla.com/nnethercote/2009/04/30/making-valgrind-easier-to-use-with-multi-process-programs/
Comment 4 Nicholas Nethercote 2009-06-29 09:52:01 UTC
*** Bug 143820 has been marked as a duplicate of this bug. ***
Comment 5 Julian Seward 2009-09-13 23:43:17 UTC
Created attachment 36928 [details]
path, updated to curr trunk, & supporting darwin/aix5 execve too

Would also like to change it so that the strings specified
by --trace-children-skip are regexps, not complete paths.
Comment 6 Julian Seward 2009-09-14 01:41:33 UTC
Created attachment 36931 [details]
patch, updated to allow use of ? and * wildcards
Comment 7 Julian Seward 2009-11-05 09:56:34 UTC
Committed as r10927.  Thanks.