From: Nicholas N. <nj...@ca...> - 2003-03-29 22:19:23
|
On Fri, 28 Mar 2003, Olly Betts wrote: > > > int VALGRIND_SILENT(int silent); > > > > > > If silent is non-zero, suppress *all* output from valgrind. Returns > > > the setting prior to the call. I think a command line option is more appropriate for this. Currently -q turns off all normal output, but still prints errors. Using -q -q could suppress everything. Although this would be useless without using the following client requests, so maybe a client request is a good way to do it. > > > VALGRIND_READ_COUNTERS(int *errors, int *lost, int *possiblylost, > > > int *reachable); > > > > > > Read counters into pointed to variables. A pointer can be zero if > > > you aren't interested in a particular value. > > > > > > VALGRIND_RESET_COUNTERS > > > > > > Zeros error and leak counters. The variable for counting the number of errors is a static global variable in coregrind/vg_errcontext.c, called "vg_n_errs_found". And the variables for "lost", "possiblylost" and "reachable" are local variables within the function VG_(generic_detect_memory_leaks)() in coregrind/vg_memory.c. The local variables would have to be made into static ones, and then get() and reset() functions would be needed for the four variables which the client requests would call. This isn't much of a problem, I guess. Also, some reshuffling of the core/skin split I'm doing is likely to make it necessary to split VALGRIND_READ_COUNTERS into two, since the number of errors will be a core thing, but the leak counts will be a Memcheck/Addrcheck skin thing. But that doesn't matter so much. All in all, they're pretty minor changes, and I think it's a good thing to make it easier to incorporate Valgrind into regression testing. So I'd be happy to add them, but only once I've done my core/skin reshuffle (assuming it is completed), which will take a little while. N |