From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31220 invoked by alias); 13 Feb 2012 21:31:43 -0000 Received: (qmail 31209 invoked by uid 22791); 13 Feb 2012 21:31:42 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 13 Feb 2012 21:31:29 +0000 From: "rth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/51798] [4.7 regression] libstdc++ atomicity performance regression due to __sync_fetch_and_add Date: Mon, 13 Feb 2012 21:31:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rth at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-02/txt/msg01370.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51798 --- Comment #31 from Richard Henderson 2012-02-13 21:30:42 UTC --- Author: rth Date: Mon Feb 13 21:30:31 2012 New Revision: 184171 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184171 Log: PR libstdc++/51798 continued * include/bits/shared_ptr_base.h (_Sp_counted_base<_S_atomic>::_M_add_ref_lock): Hoist initial load outside compare_exchange loop. * include/tr1/shared_ptr.h: Same. * include/parallel/compatibility.h (__compare_and_swap_32): Use strong version of compare_exchange. (__compare_and_swap_64): Same. * include/profile/impl/profiler_state.h (__gnu_profile::__turn): Same. * libsupc++/guard.cc (__cxa_guard_acquire): Same. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/bits/shared_ptr_base.h trunk/libstdc++-v3/include/parallel/compatibility.h trunk/libstdc++-v3/include/profile/impl/profiler_state.h trunk/libstdc++-v3/include/tr1/shared_ptr.h trunk/libstdc++-v3/libsupc++/guard.cc