Bug 148932 - give more control over what is traced by --trace-children
Summary: give more control over what is traced by --trace-children
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.2.3
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Nicholas Nethercote
URL:
Keywords:
: 143820 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-08-17 16:05 UTC by Bill Hoffman
Modified: 2009-11-05 09:56 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
add --trace-children-skip option (3.28 KB, patch)
2007-08-17 16:06 UTC, Bill Hoffman
Details
path, updated to curr trunk, & supporting darwin/aix5 execve too (17.04 KB, patch)
2009-09-13 23:43 UTC, Julian Seward
Details
patch, updated to allow use of ? and * wildcards (17.43 KB, patch)
2009-09-14 01:41 UTC, Julian Seward
Details

Note You need to log in before you can comment on or make changes to this bug.
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.