This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: merge branch profile-stdlib
On Tue, Jul 14, 2009 at 4:37 AM, Jonathan Wakely<jwakely.gcc@gmail.com> wrote:
> 2009/7/14 Silvius Rus:
>>
>> I just committed revision 149613 to the profile-stdlib branch.
>
> __GUARD isn't a very good name IMHO
>
Changed to _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD.
> Template parameter __Unused could be _Unused (single underscore
> followed by uppercase, or double underscore followed by lowercase.)
>
Changed to _Unused.
> Un-uglified local variables such as old_size can still clash with user
> macros e.g. in include/profile/vector
>
Fixed all the bad local variable names in include/profile/*.
>
>> Also, below is a sample work flow and the actual warnings issued.
> ...
>> vector-size: improvement = 4: call stack = 0x8048688 0x804a921
>> 0x804df02 0x804831e 0xf7d51450 0x80481be : advice = change initial
>> container size from 0 to 16384
>
> This change could be useful, as indicated by the estimated
> improvement, but why does this suggest an initial size 60% bigger than
> the container's final size?
>
It's a recently introduced bug. It was reporting the final
std::vector reservation, instead of the actual size. Fixed. New
warning:
vector-size: improvement = 4: call stack = 0x8048688 0x804a921
0x804df02 0x804831e 0xf7c81450 0x80481be : advice = change initial
container size from 0 to 10000
> Jonathan
>
Thank you,
Silvius