From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout3.rbg.tum.de (mailout3.rbg.tum.de [131.159.0.8]) by sourceware.org (Postfix) with ESMTPS id 9173F385AC28 for ; Wed, 27 Jul 2022 11:17:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9173F385AC28 Received: from mailrelay1.rbg.tum.de (mailrelay1.in.tum.de [131.159.254.14]) by mailout3.rbg.tum.de (Postfix) with ESMTPS id DBDAE10000E for ; Wed, 27 Jul 2022 13:17:40 +0200 (CEST) Received: by mailrelay1.rbg.tum.de (Postfix, from userid 112) id D89CEDD0; Wed, 27 Jul 2022 13:17:40 +0200 (CEST) Received: from mailrelay1.rbg.tum.de (localhost [127.0.0.1]) by mailrelay1.rbg.tum.de (Postfix) with ESMTP id B61E5DCD for ; Wed, 27 Jul 2022 13:17:40 +0200 (CEST) Received: from mail.in.tum.de (mailproxy.in.tum.de [IPv6:2a09:80c0::78]) by mailrelay1.rbg.tum.de (Postfix) with ESMTPS id B4A425B5 for ; Wed, 27 Jul 2022 13:17:40 +0200 (CEST) Received: by mail.in.tum.de (Postfix, from userid 112) id B1DD94A0272; Wed, 27 Jul 2022 13:17:40 +0200 (CEST) Received: (Authenticated sender: neumann) by mail.in.tum.de (Postfix) with ESMTPSA id 54A324A0144 for ; Wed, 27 Jul 2022 13:17:40 +0200 (CEST) (Extended-Queue-bit xtech_hm@fff.in.tum.de) Message-ID: <5cb52cbd-6613-3822-bbfd-902644940afe@in.tum.de> Date: Wed, 27 Jul 2022 13:17:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 From: Thomas Neumann Subject: PING: [PATCH v3] eliminate mutex in fast path of __register_frame To: gcc-patches@gcc.gnu.org Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KAM_SHORT, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2022 11:17:44 -0000 Summary: __register_frame and the corresponding _Unwind_Find_FDE use a global mutex for frame registration and unwinding. This can lead to very poor performance on machines with high core counts. This patch organizes the frames in a b-tree with read-optimized synchronization instead, which allows for fully parallel unwinding. See: https://gcc.gnu.org/pipermail/gcc-patches/2022-June/597256.html Best Thomas