|
From: K b <urb...@gm...> - 2010-02-23 10:24:49
|
Hello, I am running a daemon in Linux and I want to run this daemon under valgrind to find memory related errors. Since it is a daemon , I need to use trace-children = yes option. But this spawns many processes later on during its life time and I don't want them to run under valgrind. Is there a way to exclude certain children from running under valgrind? Any help is appreciated. Thanks in advance, Kumar |
|
From: Julian S. <js...@ac...> - 2010-02-23 10:59:20
|
> during its life time and I don't want them to run under valgrind. Is > there a way to exclude certain children from running under valgrind? Try --trace-children-skip. This allows skipping children based on the executable name. For example "--trace-children-skip=*/sed,*/expr,*/xgcc,*/cat,*/rm,*/stty" inhibits tracing into sed, expr, xgcc, cat, rm and stty. You need to put the entire flag in quotes to stop the shell expanding the wildcards. Be careful with this flag; make sure you don't include any process which might create a child process that you do want to trace into -- that is, make sure you don't include bash, sh, perl, python, etc, in the list. J |
|
From: K b <urb...@gm...> - 2010-02-23 11:36:28
|
Julian, Thanks for the reply. Is this option available in valgrind 3.5.0 ? When I specify this option, valgrind throws an error "Bad option '--skip-children aborting" Thanks, Kumar On Tue, Feb 23, 2010 at 4:47 PM, Julian Seward <js...@ac...> wrote: > > > during its life time and I don't want them to run under valgrind. Is > > there a way to exclude certain children from running under valgrind? > > Try --trace-children-skip. This allows skipping children based on the > executable name. For example > > "--trace-children-skip=*/sed,*/expr,*/xgcc,*/cat,*/rm,*/stty" > > inhibits tracing into sed, expr, xgcc, cat, rm and stty. You need > to put the entire flag in quotes to stop the shell expanding the > wildcards. Be careful with this flag; make sure you don't include > any process which might create a child process that you do want > to trace into -- that is, make sure you don't include bash, sh, perl, > python, etc, in the list. > > J > |
|
From: Julian S. <js...@ac...> - 2010-02-23 11:57:28
|
Oh, no sorry, I forgot to mention that. It's only available in the svn trunk. You can check out and build it following the instructions at http://www.valgrind.org/downloads/repository.html. J On Tuesday 23 February 2010, K b wrote: > Julian, > > Thanks for the reply. Is this option available in valgrind 3.5.0 ? When I > specify this option, valgrind throws an error "Bad option '--skip-children > aborting" > > Thanks, > Kumar > > On Tue, Feb 23, 2010 at 4:47 PM, Julian Seward <js...@ac...> wrote: > > > during its life time and I don't want them to run under valgrind. Is > > > there a way to exclude certain children from running under valgrind? > > > > Try --trace-children-skip. This allows skipping children based on the > > executable name. For example > > > > "--trace-children-skip=*/sed,*/expr,*/xgcc,*/cat,*/rm,*/stty" > > > > inhibits tracing into sed, expr, xgcc, cat, rm and stty. You need > > to put the entire flag in quotes to stop the shell expanding the > > wildcards. Be careful with this flag; make sure you don't include > > any process which might create a child process that you do want > > to trace into -- that is, make sure you don't include bash, sh, perl, > > python, etc, in the list. > > > > J |