|
From: Nicholas N. <nj...@cs...> - 2005-02-27 19:59:14
|
On Fri, 25 Feb 2005, Julian Seward wrote: >> And should we consider defaulting to memcheck again? > > Personally I would like that. I find it annoying to constantly > have to type --tool=memcheck (but not _always_, so .valgrindrc > isn't the answer). .valgrindrc works with that. I'm in the same situation, so I have --tool=memcheck in my .valgrindrc, and if I want to run something else I just put that on the command line; command line-specified options take precedence over the .valgrindrc ones so it all just works. I'm not convinced about defaulting to Memcheck, but if I'm overruled, so be it. Recall that I originally made this change in response to the survey responses from November 2003 -- many people were confused about this, and didn't realise that Valgrind != Memcheck. I think we still have that confusion, although perhaps it's not so bad now that we use "tool" consistently rather than "skin". If we do default to Memcheck, I could mention the existence of other tools briefly in the Quick Start guide, maybe that would be enough. > But perhaps we should. In an underhand way it creates the > expectation amongst programmers that their programs should have > no detectable leaks, and that leaks will be tested for routinely > -- every time V is run. Yes, so that's good. > And it helps our software engineering too. Currently the checker > is basically an optional component and doesn't get tested enough. > If it was engaged by default, we would know much sooner if there was > anything broken about it. I think it gets used plenty by real people, but we as developers don't test it much. But it's still a good point. We'd have to change the test outputs a lot, though. ---- FWIW, I analysed the 14 newer survey responses more carefully. Here are the counts for the always/almost always used options, and the sometimes used options: Always/almost always used: --leak-check: 10 --num-callers: 7 (10 or more, 16, 10, 100, 8, 10, 10) --tool=memcheck: 4 (under-reported) --show-reachable: 4 --suppressions: 2 --trace-children=yes: 2 --error-limit=no: 1 -q: 1 Sometimes used: --leak-check: 5 --show-reachable: 3 --gdb-attach: 2 --logfile-fd=4 2 (4, -1) --leak-resolution=high: 2 --num-callers: 2 (30, 8) -v: 1 --help: 1 [I see that the --leak-check counts add up to 15. Must have counted one twice, whoops.] I guess the aim here should be that there is no option that a majority of users are almost always setting -- anything like that should be a default. Analysis and recommendations: * 12/14 use Memcheck 90% or more of the time. (The count of 4 is under-reported.) Recommendation: make it default again, and make it clear in the quick start guide that there are other tools. * Approx 2/3 of respondents used --leak-check always/almost always, the rest sometimes use it. Recommendation: make --leak-check=yes the default. * Half of users always increase --num-callers, and 2/14 sometimes do. It looks like 10 might be a good default, maybe 12. I'm guessing those that put it much higher are using C++ STL. (You could argue that it should be much higher, since it's probably not such a bad thing to have the whole trace present.) Recommendation: make --num-callers=12 the default. * --show-reachable=yes is quite popular, but not super-popular. Recommendation: leave --show-reachable=no the default. If no-one objects, I will commit these changes soon. N |