From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81262 invoked by alias); 26 Aug 2019 01:25:00 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 81199 invoked by uid 89); 26 Aug 2019 01:24:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-20.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=supporting, comparisons, HTo:U*mark, H*c:alternative X-Spam-Status: No, score=-20.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: mx0b-0010f301.pphosted.com Received: from mx0b-0010f301.pphosted.com (HELO mx0b-0010f301.pphosted.com) (148.163.153.244) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 Aug 2019 01:24:53 +0000 Received: from pps.filterd (m0102858.ppops.net [127.0.0.1]) by mx0b-0010f301.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x7Q1L4fU020802; Sun, 25 Aug 2019 20:24:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rice.edu; h=date : from : subject : to : cc : message-id : in-reply-to : references : mime-version : content-type; s=ricemail; bh=SVQ9z5VXSQM99tcTsH+ic1jtyPm1vnUYF3U8/p64clo=; b=kaaHGrSoZoUxO7QH7vUIA1kK+5VVh03RPwSVi88ETNlz86mlsO7RdZ3CGCV8x8rEn/xY 5py9yNAHSA8aXbZpg3b2CbA2yp748g1rR5pQ0xGzFsjCHjlOTrPOwBvGKP0m87dxfLyZ FIU0w8JUzh75v3wDKbrhrfMZSr+RRLj2+AFrfzBS968pGBUd8DlqpLjDrl2T9RxWMrgA vi3OtTb17m+EGOyYqvwPlO/MloqNonRh9K1O2z7mQKysmOlJ/7PYAa1zHUpFZnPNGZhI INzI44szBkwIwPKqWW+6bCRx99WyN4f1Nh+nmhFa8+cx0pzbpMyiPXtjBByzcURIxbH2 KA== Received: from mh2.mail.rice.edu (mh2.mail.rice.edu [128.42.201.21]) by mx0b-0010f301.pphosted.com with ESMTP id 2ujyxqhc10-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 25 Aug 2019 20:24:50 -0500 Received-X: from mh2.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh2.mail.rice.edu (Postfix) with ESMTP id C9C7E50020E; Sun, 25 Aug 2019 20:24:49 -0500 (CDT) Received-X: from mh2.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh2.mail.rice.edu (Postfix) with ESMTP id C899D5001D3; Sun, 25 Aug 2019 20:24:49 -0500 (CDT) X-Virus-Scanned: by amavis-2.7.0 at mh2.mail.rice.edu, auth channel Received-X: from mh2.mail.rice.edu ([127.0.0.1]) by mh2.mail.rice.edu (mh2.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id 5wRPyPSlw44h; Sun, 25 Aug 2019 20:24:49 -0500 (CDT) Received: from c-73-76-250-127.hsd1.tx.comcast.net (c-73-76-250-127.hsd1.tx.comcast.net [73.76.250.127]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jma14) by mh2.mail.rice.edu (Postfix) with ESMTPSA id 72435500191; Sun, 25 Aug 2019 20:24:49 -0500 (CDT) Date: Mon, 26 Aug 2019 01:25:00 -0000 From: Jonathon Anderson Subject: Re: [PATCH] libdw: add thread-safety to dwarf_getabbrev() To: Mark Wielaard Cc: elfutils-devel@sourceware.org, Srdan Milakovic Message-Id: <1566782688.5803.0@smtp.mail.rice.edu> In-Reply-To: <5ba06557703ee363e19488c994cbddd92ade25be.camel@klomp.org> References: <1565983469.1826.0@smtp.mail.rice.edu> <20190824232438.GA2622@wildebeest.org> <1566695452.979.1@smtp.mail.rice.edu> <5ba06557703ee363e19488c994cbddd92ade25be.camel@klomp.org> X-Mailer: geary/0.12.4 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-08-25_15:2019-08-23,2019-08-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 spamscore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 suspectscore=4 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1906280000 definitions=main-1908260012 Content-Type: text/plain; charset=iso-8859-2; format=flowed Content-Transfer-Encoding: quoted-printable X-SW-Source: 2019-q3/txt/msg00134.txt.bz2 Hello Mark, Next iteration of the patch(es) are ready, hosted on Github (git=20 request-pull output below). I think most of the issues we've discussed=20 have been addressed; the setup with stdatomic.h is a little WIP, I=20 wasn't certain how it should be done moving forward (and, I'm not all=20 that familiar with Autotools). The one extra line in dwarf_getcfi.c is=20 to account for a failure in the test suite when Valgrind is enabled=20 (didn't catch it the first time around). I like the idea of "owner" threads (and I think it should be simple=20 enough to implement), but I'd like to do some performance comparisons=20 against the pthread_key_* option before adding too much more complexity. -Jonathon The following changes since commit=20 37fa94df1554aca83ec10ce50bc9bcb6957b204e: config/elfutils.spec.in: package eu-elfclassify (2019-08-15 09:17:41=20 +0200) are available in the Git repository at: https://github.com/blue42u/elfutils.git for you to fetch changes up to 9e40e0b8bb329692b1140e99896164bcb7f791b8: lib + libdw: Add and use a concurrent version of the dynamic-size=20 hash table. (2019-08-25 18:36:38 -0500) ---------------------------------------------------------------- Jonathon Anderson (3): Add configure options for Valgrind annotations. Add some supporting framework for C11-style atomics. libdw: Rewrite the memory handler to be thread-safe. Sr=F0an Milakovi=E6 (1): lib + libdw: Add and use a concurrent version of the dynamic-size=20 hash table. ChangeLog | 5 + configure.ac | 42 ++++ lib/ChangeLog | 11 + lib/Makefile.am | 5 +- lib/atomics.h | 37 +++ lib/dynamicsizehash_concurrent.c | 522=20 +++++++++++++++++++++++++++++++++++++++ lib/dynamicsizehash_concurrent.h | 118 +++++++++ lib/stdatomic-fbsd.h | 442=20 +++++++++++++++++++++++++++++++++ libdw/ChangeLog | 12 + libdw/Makefile.am | 4 +- libdw/dwarf_abbrev_hash.c | 2 +- libdw/dwarf_abbrev_hash.h | 2 +- libdw/dwarf_begin_elf.c | 13 +- libdw/dwarf_end.c | 22 +- libdw/dwarf_getcfi.c | 1 + libdw/libdwP.h | 19 +- libdw/libdw_alloc.c | 70 +++++- 17 files changed, 1300 insertions(+), 27 deletions(-) create mode 100644 lib/atomics.h create mode 100644 lib/dynamicsizehash_concurrent.c create mode 100644 lib/dynamicsizehash_concurrent.h create mode 100644 lib/stdatomic-fbsd.h