[patch] debug mode
François Dumont
francois.cppdevs@free.fr
Sat Jul 31 08:46:00 GMT 2010
Ok, I will consider all your remarks when I come back from vacations in
2 weeks.
Thanks
On 07/28/2010 10:16 PM, Paolo Carlini wrote:
> 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.
>
More information about the Libstdc++
mailing list