This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch] debug mode
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: François Dumont <francois dot cppdevs at free dot fr>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Wed, 28 Jul 2010 22:16:11 +0200
- Subject: Re: [patch] debug mode
- References: <4C4F3C54.8020106@free.fr>
Hi,
> Hello
>
> I received the notification that my assignment process is
> completed so here is my first patch to the debug mode.
Good.
>
>
> I have applied the so long promised enhancement to debug container
> to limit performance impact by removing the safe iterator wrapper when
> possible before passing them to not debug methods. I noticed while
> doing my tests that directly using debug container by using #include
> <debug/vector> for instance was not giving the same result as when
> using debug thanks to the _GLIBCXX_DEBUG macro, I fixed this problem.
I'm not sure to understand how you actually tested the patch: I would
say both 'make check' and 'make check-debug' should be tested for this
kind of work. Did you do that? For x86_64-linux or what?
Also, being a pure enhancement, before considering applying it, I would
like to see some numbers about the actual benefits: pick some code
snippets of your choice and show us how runtime and/or code size are
measurably improved. As I said already, unless the benefits are
remarkable, this is not a high priority enhancement, because debug-mode
isn't certainly about performance. By the way, I suspect that if one
*really* cares about performance one of the very first things to do
would be measuring the impact of the locks and try to improve on those.
Stylistically, make sure to follow the conventions used everywhere in
the library, thus 80 columns, open curly bracket always at the beginning
of the line, etc.
> I haven't been able to check with dejaGNU that a test failed with
> an expected output. It would be useful to check debug mode behavior
> like what I have done with all the tests I proposed to add to the
> testsuite. Is this form of tests based on generic test case applied to
> the different containers ok ?
I think it is, but please, don't specify the full path, is not necessary
if the headers belong to testsuite/util, there are already plenty of
examples in the testsuite.
Finally, please always send one single patch including the testcases too.
Thanks,
Paolo.