|
From: Chris P. <jud...@gm...> - 2009-03-01 22:11:53
|
Hi, I'm sure I've seen some reference to this before but I can't seem to find it in the user manual, FAQ or quick start guide. Is there a way to trigger a valgrind tool to generate its output without the program exiting. I'm looking at memory consumption/leaks in system daemons that don't normally exit. So after a certain period in a test I'd like to have <insert tool of choice here> generate its output so I can start looking at it but keep going so I can do it again later. I vaguely recall being told that we are able to send a signal to cause valgrind to trigger the tool to print its report. The tools I'm using are memcheck and massif with valgrind version 3.3.1 (haven't got round to cross compiling 3.4.0 yet). Thanks, Chris |
|
From: Nicholas N. <n.n...@gm...> - 2009-03-01 22:22:47
|
On Mon, Mar 2, 2009 at 9:11 AM, Chris Packham <jud...@gm...> wrote: > > Is there a way to trigger a valgrind tool to generate its output > without the program exiting. I'm looking at memory consumption/leaks > in system daemons that don't normally exit. So after a certain period > in a test I'd like to have <insert tool of choice here> generate its > output so I can start looking at it but keep going so I can do it > again later. > > I vaguely recall being told that we are able to send a signal to cause > valgrind to trigger the tool to print its report. > > The tools I'm using are memcheck and massif with valgrind version > 3.3.1 (haven't got round to cross compiling 3.4.0 yet). You can ask for a leak-check mid-execution. See VALGRIND_COUNT_LEAKS and VALGRIND_DO_LEAK_CHECK at http://www.valgrind.org/docs/manual/mc-manual.html#mc-manual.clientreqs Callgrind also has some mid-execution dump facilities. Massif doesn't, though. Nick |