Version: (using Devel) OS: Linux Installed from: Compiled sources http://blog.mozilla.com/nnethercote/2009/04/30/making-valgrind-easier-to-use-with-multi-process-programs/ describes proposals for finer control of which child processes to trace. In my case, I would like to exclude tracing /bin/sh, but also wine valgrind. i.e. the decision can't be made just on argv[0], but has to take argv[1] into account, too. Perhaps if the blacklist and whitelist options accepted regexps, and operated on the whole commandline somehow, that would do. Having this would make my runs considerably faster. I may hack in a hardcoded "don't valgrind python" kludge of my own in the meantime.
Created attachment 39929 [details] patch to add option for skip tracing children Here is a patch that adds --trace-skip=STR. This disables --trace-chidren for cases where the child's argv contains an argument that's equal to STR. The matching is just a simple strcmp(), no fancy regexp. You can pass multiple --trace-skip arguments to valgrind the same way you pass --suppression.
(In reply to comment #1) > Created an attachment (id=39929) [details] > patch to add option for skip tracing children > > Here is a patch that adds --trace-skip=STR. This disables --trace-chidren for > cases where the child's argv contains an argument that's equal to STR. Er, I think we already have this functionality in the trunk now: --trace-children-skip=patt1,patt2,... specifies a list of executables that --trace-children=yes should not trace into Is that what you were after? Or do I misunderstand?
Yes, that's what I'm after. I guess Dan K should close this bug as a duplicate of bug 148932.
Oh, looks like--trace-children-skip doesn't quite do what I want. In our test case, we're running the command: /path/to/wine-preloader /path/to/wine Z:\\path\\to\\python.exe. My patch examines all the arguments whereas --trace-children-skip only examines the first argument. That's not fine-grained enough because every command is /path/to/wine-preloader /path/to/wine foo.exe.
Created attachment 39931 [details] patch to try matching against all arguments and not just the exe name
(In reply to comment #4) > Oh, looks like--trace-children-skip doesn't quite do what I want. In our test > case, we're running the command: > > /path/to/wine-preloader /path/to/wine Z:\\path\\to\\python.exe. > > My patch examines all the arguments whereas --trace-children-skip only examines > the first argument. That's not fine-grained enough because every command is > /path/to/wine-preloader /path/to/wine foo.exe. I guess that --trace-children-skip-by-arg=... does provide the desired functionality ?
Yes, probably, thanks.