From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout2.rbg.tum.de (mailout2.rbg.tum.de [IPv6:2a09:80c0::202]) by sourceware.org (Postfix) with ESMTPS id 6D4F63858C74 for ; Fri, 26 Aug 2022 13:02:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6D4F63858C74 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=in.tum.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=in.tum.de Received: from mailrelay1.rbg.tum.de (mailrelay1.in.tum.de [131.159.254.14]) by mailout2.rbg.tum.de (Postfix) with ESMTPS id 3D6624C0200 for ; Fri, 26 Aug 2022 15:02:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=in.tum.de; s=20220209; t=1661518920; bh=uI+nx2D5I0PEZKOhA5nkx0ZoHqvPtTiNvwKxYOIffJU=; h=Date:From:Subject:To:From; b=cTZYEali/hpiTxQsphfTffb5Jl90FkWm4k0VMovkfkCVC9GPVuhdOagw4d+ccupYS hpHsWJjuqBq27aeQunSMrQNJk5iUKF0ZaD1xlhZkOEsZZ1rP+qovGoriuIpK9mAp0A ekB/sSg8r38b/LUtTT4jwV1hTuE5XL4tlqisV9UHsemb6bRPLCIWCkItIAf/j4ixWU ugprs5KYa/6PyDnjwMQMoFJVBQikgn90TMqda7WspMjFp/xCzgUpcXcpx8zte7POaZ QtMSL/bs+Drz1RMYEAOSpbi3qmNOIqmltyV2IwkE/rh7mhUjqZeqLCEDmTQTA2bK7k uS985dhzpHZtA== Received: by mailrelay1.rbg.tum.de (Postfix, from userid 112) id 3A86D544; Fri, 26 Aug 2022 15:02:00 +0200 (CEST) Received: from mailrelay1.rbg.tum.de (localhost [127.0.0.1]) by mailrelay1.rbg.tum.de (Postfix) with ESMTP id 00AAA542 for ; Fri, 26 Aug 2022 15:02:00 +0200 (CEST) Received: from mail.in.tum.de (vmrbg426.in.tum.de [131.159.0.73]) by mailrelay1.rbg.tum.de (Postfix) with ESMTPS id F3A4722 for ; Fri, 26 Aug 2022 15:01:59 +0200 (CEST) Received: by mail.in.tum.de (Postfix, from userid 112) id F10E74A0279; Fri, 26 Aug 2022 15:01:59 +0200 (CEST) Received: (Authenticated sender: neumann) by mail.in.tum.de (Postfix) with ESMTPSA id A16D64A0164 for ; Fri, 26 Aug 2022 15:01:59 +0200 (CEST) (Extended-Queue-bit xtech_nz@fff.in.tum.de) Message-ID: <90477551-1638-1669-d54e-685257020479@in.tum.de> Date: Fri, 26 Aug 2022 15:01:59 +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^2: [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=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KAM_SHORT,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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