This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: ping -- Re: merge branch profile-stdlib
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Silvius Rus <rus at google dot com>
- Cc: libstdc++ at gcc dot gnu dot org, Paolo Carlini <paolo dot carlini at oracle dot com>, Benjamin Kosnik <bkoz at redhat dot com>
- Date: Mon, 8 Jun 2009 22:38:30 +0100
- Subject: Re: ping -- Re: merge branch profile-stdlib
- References: <e90dbffc0906080946p111df301lf342688682667788@mail.gmail.com>
2009/6/8 Silvius Rus:
>> - Uglified names. I did this by placing all diagnostic implementation
>> under namespace __cxxprof_impl. (Is this sufficient?)
Users are allowed to say
#define turn_on 1
#include <vector>
It looks like this would cause an error if profiled.
>> - We are using vector and unordered_map in the implementation, with
>> default allocators. This can cause infinite cycles if say the
>> application code uses libstdc++ containers to gather allocation
>> statistics.
That seems problematic to me - does it mean that users wanting to
improve their use of standard containers must use (and possibly write)
non-standard containers?
Would it be possible to expose the standard containers via a different
namespace, so they can be used to gather statistics?
e.g.__gnucxx_not_profiled::vector would be a std::vector-compatible
type (based on the same code) without profiling support, that could be
used to gather statistics about std::vector use - is that possible, or
have I misunderstood what you meant?
Just my two (not a libstdc++ maintainer) cents,
Jonathan