From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127490 invoked by alias); 29 Oct 2019 18:55:33 -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 127027 invoked by uid 89); 29 Oct 2019 18:55:32 -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=-14.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=Valgrind, HX-Languages-Length:2344, H*c:alternative X-Spam-Status: No, score=-14.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,HTML_MESSAGE,RCVD_IN_DNSWL_LOW 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; Tue, 29 Oct 2019 18:55:31 +0000 Received: from pps.filterd (m0102859.ppops.net [127.0.0.1]) by mx0b-0010f301.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9TIpZpi012230; Tue, 29 Oct 2019 13:55:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rice.edu; h=date : from : subject : to : cc : message-id : mime-version : content-type; s=ricemail; bh=o7T9cBzGqEp3CPnpKORJHf6qhUii+D+YOIaXPGQ8DnQ=; b=D+8/rlMo9C7O9xG8fqPALRyJGglsrhBfSv1LfhaQDN5tPo1ZzmnqMjQGMW+u4dXlf3Ga rgwQEViajI+RPqzeGONuwpMuW8Ln5KQphqp5Ph+IuqyNThB6UhuXlmzfTw9CkoViMNuU 5dcE60tk1L5TgOyUfnrgCK6aF/ZslnVOVrsbVgaN9hHpYZxEmWjezZT0BNdb6j4xcmfp 1zxsmIHgXYa+wThsC1/+aVH6qitJM5YpRb5QIqWtt4uIuxKC3sC1Likfu9iJ1Xj3w2RB bPu1xM2qrpAFqmz9MidAHbz1saqzhWtr9kvAtwpSfqYcqhXMWHffu7jihJHLdPkH/mEh Wg== Received: from mh3.mail.rice.edu (mh3.mail.rice.edu [128.42.199.10]) by mx0b-0010f301.pphosted.com with ESMTP id 2vvhgvupp3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Oct 2019 13:55:26 -0500 Received-X: from mh3.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh3.mail.rice.edu (Postfix) with ESMTP id 0121940512; Tue, 29 Oct 2019 13:55:26 -0500 (CDT) Received-X: from mh3.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh3.mail.rice.edu (Postfix) with ESMTP id 0013540510; Tue, 29 Oct 2019 13:55:25 -0500 (CDT) X-Virus-Scanned: by amavis-2.7.0 at mh3.mail.rice.edu, auth channel Received-X: from mh3.mail.rice.edu ([127.0.0.1]) by mh3.mail.rice.edu (mh3.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id 6y2XceZ6gtyr; Tue, 29 Oct 2019 13:55:25 -0500 (CDT) Received: from cslinux29.cs.rice.edu (cslinux29.cs.rice.edu [168.7.116.104]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jma14) by mh3.mail.rice.edu (Postfix) with ESMTPSA id CCD36401B3; Tue, 29 Oct 2019 13:55:25 -0500 (CDT) Date: Tue, 29 Oct 2019 18:55:00 -0000 From: Jonathon Anderson Subject: [PATCH 0/2] libdw: Rewrite the memory handler to be more robust To: Mark Wielaard Cc: elfutils-devel@sourceware.org Message-Id: <1572375325.2128.1@rice.edu> X-Mailer: geary/3.34.1 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-29_05:2019-10-28,2019-10-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=85 bulkscore=0 phishscore=0 mlxlogscore=-75 lowpriorityscore=0 suspectscore=0 priorityscore=1501 malwarescore=0 clxscore=1015 mlxscore=85 spamscore=85 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1908290000 definitions=main-1910290163 Content-Type: text/plain; charset=us-ascii; format=flowed X-SW-Source: 2019-q4/txt/msg00072.txt.bz2 Hello, This is (revived and rebased) version of the libdw memory manager that isn't affected by the PTHREAD_KEYS_MAX limit. There are some downsides, in particular if an application spawns many short-lived threads that all touch a Dwarf (enough to cause an allocation), there's about ~8N bytes of memory overhead. The first patch is not required and adds some configure-time options for Valgrind annotation support (although, I'm not a serious autotools user, so it might need some work). -Jonathon ---------------------------------------------------------------- Jonathon Anderson (2): Add configure options for Valgrind annotations. libdw: Rewrite the memory handler to be more robust. ChangeLog | 5 +++++ configure.ac | 30 ++++++++++++++++++++++++++++++ lib/atomics.h | 2 ++ libdw/ChangeLog | 9 +++++++++ libdw/dwarf_begin_elf.c | 7 ++++--- libdw/dwarf_end.c | 24 +++++++++++++----------- libdw/libdwP.h | 67 ++++++++++++++++++++++++++++++++----------------------------------- libdw/libdw_alloc.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 8 files changed, 160 insertions(+), 53 deletions(-)