ping -- Re: merge branch profile-stdlib

Jonathan Wakely jwakely.gcc@gmail.com
Mon Jun 8 21:38:00 GMT 2009


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



More information about the Libstdc++ mailing list