From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTPS id E5F0F385841C for ; Wed, 3 Nov 2021 16:28:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E5F0F385841C Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-463-6_ECKDL5NgWyHdHiPsPzlA-1; Wed, 03 Nov 2021 12:28:30 -0400 X-MC-Unique: 6_ECKDL5NgWyHdHiPsPzlA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 756D25074B; Wed, 3 Nov 2021 16:28:29 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.3]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 375EA2B060; Wed, 3 Nov 2021 16:28:28 +0000 (UTC) From: Florian Weimer To: gcc-patches@gcc.gnu.org Cc: libc-alpha@sourceware.org, Jakub Jelinek , Jason Merrill Subject: [PATCH 0/4] Use _dl_find_eh_frame to locate DWARF EH data in the unwinder X-From-Line: adeb300eebaa792d64fca85f1e72fed03c1b32d1 Mon Sep 17 00:00:00 2001 Message-Id: Date: Wed, 03 Nov 2021 17:28:26 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=unavailable autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, 03 Nov 2021 16:28:35 -0000 This is the GCC side of the patch series. To simplify testing, a weak reference to _dl_find_eh_frame is used to enable this feature when running on newer glibc even if built for older glibc. The first three patches are cleanups/refactorings to simplify the actual change in the last patch. Benchmarking-wise, the new unwinder is slightly faster even in the optimal case for the old implementation (single-threaded, 100% cache hit rate). The old implementation performs really poorly once the cache hit rate drops and the number of shared objects participating in unwinding increases, so that's not a fair comparison. Old performance with multiple threads is also poor due to the global loader lock implied by dl_iterate_phdr (which is necessary to serialize access to the libgcc unwinder cache), and I haven't bother to benchmark that. Thanks, Florian Florian Weimer (4): libgcc: Remove tbase member from struct unw_eh_callback_data libgcc: Remove dbase member from struct unw_eh_callback_data if NULL libgcc: Split FDE search code from PT_GNU_EH_FRAME lookup libgcc: Use _dl_find_eh_frame in _Unwind_Find_FDE libgcc/unwind-dw2-fde-dip.c | 185 +++++++++++++++++++++++++++--------- 1 file changed, 139 insertions(+), 46 deletions(-) base-commit: 6b8b25575570ffde37cc8997af096514b929779d -- 2.31.1