From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 47265 invoked by alias); 18 Jul 2018 14:41:26 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 46872 invoked by uid 89); 18 Jul 2018 14:41:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 spammy=readers, Hx-languages-length:1036 X-HELO: sesbmg22.ericsson.net Received: from sesbmg22.ericsson.net (HELO sesbmg22.ericsson.net) (193.180.251.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Jul 2018 14:41:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/simple; q=dns/txt; i=@ericsson.com; t=1531924882; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1X5PHREzJd9QdjVvqC1AKqbgW7k1gJmPUe2MDQJKUq8=; b=ObcbRXNi30ojvkahiD2FkAgRKzxY+W2LsCI6KG366+bGKt0fJI7xXAycSjDjnSAI SL7nKF9bElxhTKuyJrRuXg0kSWfNlfKmnxWOUy8XSXqQn4JDYI481gTCZU+M6i+z wUj5chGC7FGnrR0Hu7FncIqPsYZB8TTo4gmLXlX3WWw=; Received: from ESESBMB504.ericsson.se (Unknown_Domain [153.88.183.117]) by sesbmg22.ericsson.net (Symantec Mail Security) with SMTP id BD.61.22978.2915F4B5; Wed, 18 Jul 2018 16:41:22 +0200 (CEST) Received: from ESESSMR502.ericsson.se (153.88.183.110) by ESESBMB504.ericsson.se (153.88.183.117) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 18 Jul 2018 16:41:22 +0200 Received: from ESESSMB502.ericsson.se (153.88.183.163) by ESESSMR502.ericsson.se (153.88.183.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 18 Jul 2018 16:41:22 +0200 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (153.88.183.157) by ESESSMB502.ericsson.se (153.88.183.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3 via Frontend Transport; Wed, 18 Jul 2018 16:41:21 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZCcG/3XO92QCWKhhnbmUcg42kPsuYbmNTqs5ZXFOsCY=; b=aASblKODIMVtAKS7qvoNRle6lgDdjpcD8/y2RIK842UDH5Ack2uxRETMaVEE6+i9CMwpnoWgZGAEt5DtZVcmhfrZT9TFE8n9zM5YxesjUjC0HaY4Epekd0jVQCh8KsdmriIFCjMOSIcuxB2r2YJTCf2VUfu2dCD1fTGT1+a+EMA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=simon.marchi@ericsson.com; Received: from [10.0.0.110] (192.222.164.54) by SN6PR15MB2400.namprd15.prod.outlook.com (2603:10b6:805:24::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.952.19; Wed, 18 Jul 2018 14:41:18 +0000 Subject: Re: [RFA 15/15] Move psymtabs to their own obstack To: Tom Tromey , References: <20180510222357.27332-1-tom@tromey.com> <20180510222357.27332-16-tom@tromey.com> From: Simon Marchi Message-ID: Date: Wed, 18 Jul 2018 14:41:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180510222357.27332-16-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-Path: simon.marchi@ericsson.com Received-SPF: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) X-IsSubscribed: yes X-SW-Source: 2018-07/txt/msg00556.txt.bz2 On 2018-05-10 06:23 PM, Tom Tromey wrote: > Previously, the psymtab obstack was just a pointer to the objfile > obstack. This patch changes psymtabs to use their own obstack, > instead. A gdb::optional is used to avoid unnecessary allocation when > the obstack is not needed. > > After this patch, the psymtab code lifetime model is that, in the core > psymtab code, objects allocated on the psymtab obstack may point to > other such objects, or to objects on the per-BFD obstack -- but never > to the objfile obstack. > > Note however that this invariant is only obeyed the core psymtab code. > Symbol readers are free to work however they like; and in particular, > even after this patch, in practice all symbol readers violate this > invariant via the read_symtab_private field. Thanks, LGTM. I think you can remove the objfile parameter in the psymtab_storage constructor, it is not used (this shows that psymtab_storage no longer relies on the objfile for allocations). Simon