This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: exchange_and_add inlined in g++ 4.0.2
On Sun, Nov 06, 2005 at 02:08:53AM +0100, Paolo Carlini wrote:
> This problem dates back to february, 2004:
> http://gcc.gnu.org/ml/libstdc++/2004-02/msg00372.html
Thanks for the reference. So do I understand correctly there is no way to
get the i486+ version?
> and we really hoped the performance would not be measurably affected...
> You say "appear in the profile", indeed, I can confirm that recently I
> saw it myself quite a few times, but I wonder whether it's very high in
> your profile or not, can you quantify?
It is the top function that is related to the pdns_recursor in this system-wide profile:
CPU: Pentium M (P6 core), speed 1398.97 MHz (estimated)
Counted CPU_CLK_UNHALTED events (clocks processor is not halted, and not in a thermal trip) with a unit mask of 0x00 (No unit mask) count 100000
samples % image name app name symbol name
366472 48.6481 vmlinux-2.6.14-ahu vmlinux-2.6.14-ahu poll_idle
31923 4.2377 anon (tgid:4494 range:0x81fd000-0x86ab000) Xorg (no symbols)
15241 2.0232 libstdc++.so.6.0.5 libstdc++.so.6.0.5 __gnu_cxx::__exchange_and_add(int volatile*, int)
11936 1.5845 vmlinux-2.6.14-ahu vmlinux-2.6.14-ahu get_offset_pmtmr
10314 1.3692 libstdc++.so.6.0.5 libstdc++.so.6.0.5 std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)
10160 1.3487 libc-2.3.5.so libc-2.3.5.so vfprintf
9760 1.2956 libstdc++.so.6.0.5 libstdc++.so.6.0.5 __gnu_cxx::__mt_alloc<char, __gnu_cxx::__common_pool_policy<__gnu_cxx::__pool, true> >::allocate(unsigned int,
void const*)
9154 1.2152 libstdc++.so.6.0.5 libstdc++.so.6.0.5 __gnu_cxx::__pool<true>::_M_reclaim_block(char*, unsigned int)
8759 1.1627 libc-2.3.5.so libc-2.3.5.so memcpy
8315 1.1038 libstdc++.so.6.0.5 libstdc++.so.6.0.5 __gnu_cxx::__atomic_add(int volatile*, int)
7369 0.9782 libstdc++.so.6.0.5 libstdc++.so.6.0.5 std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()
6341 0.8417 libstdc++.so.6.0.5 libstdc++.so.6.0.5 .plt
5996 0.7960 libc-2.3.5.so libc-2.3.5.so _int_malloc
5203 0.6907 libc-2.3.5.so libc-2.3.5.so memmove
4253 0.5646 pdns_recursor pdns_recursor std::_Rb_tree<DNSResourceRecord, DNSResourceRecord, std::_Identity<DNSResourceRecord>, std::less<DNSResourceRecord>, std::allocator<DNSResourceRecord> >::insert_unique(DNSResourceRecord const&)
4040 0.5363 pdns_recursor pdns_recursor MOADNSParser::init(char const*, unsigned int)
4032 0.5352 libstdc++.so.6.0.5 libstdc++.so.6.0.5 std::string::_Rep::_S_create(unsigned int, unsigned int, std::allocator<char> const&)
3834 0.5090 pdns_recursor pdns_recursor MemRecursorCache::doPrune()
3830 0.5084 libstdc++.so.6.0.5 libstdc++.so.6.0.5 __gnu_cxx::__pool<true>::_M_get_thread_id()
> This is a very reasonable request, in my opinion. Actually, I considered
> briefly that issue some time ago, then got distracted, unfortunately.
> Can you possibly file a complete Bugzilla PR describing this enhancement
> request? You can also put there, immediately, or afterwards, any
> additional info as per the point above.
Will do. I think I can provide my own __exchange_and_add as an inline?
Thanks!
--
http://www.PowerDNS.com Open source, database driven DNS Software
http://netherlabs.nl Open and Closed source services