This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Debug mode lite plan
- From: Christopher Jefferson <chris at bubblescope dot net>
- To: FranÃois Dumont <frs dot dumont at gmail dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 31 Jul 2015 22:30:33 +0100
- Subject: Re: Debug mode lite plan
- Authentication-results: sourceware.org; auth=none
- References: <55BBD2F2 dot 3040901 at gmail dot com>
I really like this idea, and will be happy to review any patches when
they are done. I've meant to do this for years (and failed), I believe
it has been proposed before but (I assume) never committed. That
shouldn't stop you from doing it again!
My only criticism (and I realise this sounds like bikesheding) is that
the name is far too cute :) Perhaps _GLIBCXX_DEBUG_LITE ? (I believe
that has been suggested before, but don't believe it was ever
committed).
Chris
On 31 July 2015 at 20:56, FranÃois Dumont <frs.dumont@gmail.com> wrote:
> Hi
>
> I am going to work on debug mode lite and would like to share with
> you what I plan to do.
>
> As announced debug mode lite will be a limited debug mode that is to
> say:
> - O(1) debug checks
> - ABI compatible
>
> O(1) should be considered as limited performance impact. It is not
> easy to forecast if a debug check will have an impact cause even if the
> check has a O(1) complexity it can be called in a O(N) higher level algo
> resulting in a noticeable impact. But you get the idea.
>
> ABI compatible means that when activated you will be able to build a
> single translation and have it linked smoothly with the rest of the
> application. I still plan to use inlined namespace in this mode. Debug
> mode containers will simply be abi compatible with normal ones. So no
> more safe iterator list maintained in the container in this mode. I even
> hope that we will be able to use string debug implementation in this
> mode so that we do not need to inject all sorts of debug checks in
> normal implementation. That's the trickiest part of this plan, just tell
> me if it simply can't work.
>
> Regarding the name of this mode I was thinking about _GLIBCXX_DBG,
> which is a limited way to write _GBLIBCXX_DEBUG.
>
> FranÃois