From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2089.outbound.protection.outlook.com [40.107.20.89]) by sourceware.org (Postfix) with ESMTPS id 801113858D20 for ; Fri, 20 Jan 2023 17:33:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 801113858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tPWJBmB1yczFsyM+Wq7NKHNYtgeWsUV1Vr+VbyLNRwo=; b=8qspHbsUBHap/YauPCp+bNjNsolftSvlhtljbna9C5jJHBdM2e5qMzZaLhAbwtDQKJs43cQqMFvEFlgNE5oxZGCN7k4GNUiQ9TZCULpOmOMM60N0Y/7WCeVhRawiPx9aLlurs6Er7NWInAoFH+KjC04S5JAitr0DNts3Ww0Zig4= Received: from AS9PR06CA0635.eurprd06.prod.outlook.com (2603:10a6:20b:46f::7) by PAVPR08MB9627.eurprd08.prod.outlook.com (2603:10a6:102:31b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.25; Fri, 20 Jan 2023 17:33:42 +0000 Received: from AM7EUR03FT005.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:46f:cafe::e5) by AS9PR06CA0635.outlook.office365.com (2603:10a6:20b:46f::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.27 via Frontend Transport; Fri, 20 Jan 2023 17:33:42 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM7EUR03FT005.mail.protection.outlook.com (100.127.140.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6023.16 via Frontend Transport; Fri, 20 Jan 2023 17:33:42 +0000 Received: ("Tessian outbound 333ca28169fa:v132"); Fri, 20 Jan 2023 17:33:42 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 8973dd3cdb2ec198 X-CR-MTA-TID: 64aa7808 Received: from e7afab1cc5f1.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 1286B584-DC1F-4F35-9865-7F5A7672261D.1; Fri, 20 Jan 2023 17:33:34 +0000 Received: from EUR03-AM7-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e7afab1cc5f1.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 20 Jan 2023 17:33:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G5QN8hv0+wcO3Wh3HEZ4tQl/7JTSrJs+YB/3lP7W9g+dLTcAeIsDgzdKBLcHN/kcN9o21RlfA2Ubl6BQXjUbUJM4+H5WDjsp/b6AvlvaCzjg2iBm1uaU85NuACRgOoyUerZyjmgnji8m/upIPdxYXLZ3rqAMwAWhvROGBVIY6Ne9WlcumQlDHevpr+YwpQx8NOSn+CFpQq2c0yCr18VEXqdI+TpL9bd1aAVYAs97ThzqDBgogiSddmJtWyqWX0r7gsFMkX3K/Ecvw5jT4wXxM6OxhXnfpRmay+4ywyno+wvsP4gNSqoDOCxBuwZVAr3U2zu2W/RGFtgSjUusBgAezA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tPWJBmB1yczFsyM+Wq7NKHNYtgeWsUV1Vr+VbyLNRwo=; b=Ax7KdHXawVcVD+1Pc8wsZX+mPY++NEmgvj6u1bJEczjkC9tqHISdXKR5yvFaIchIax07zLIMb3ejxceOjfKt0j01sjsVTgO/FR/oV+DfF2t/KwaB1/2/D86rZ++sjuo8cvUE6qcWA5qICrNDBkdxLgN04Kj/7XtjZ4jVr5f25E6oLUxeIkc1RvcC0v9f4gEXOW9/1O/RkrBnTbzdHpVfNk0V1C9flEPO73Nnn3pXeVLxWChr0ovxYsjFqKINzbl0E+djAunK+P4Tv9uW2JYRIOaB95e/bh+M2pQMUKilHx56a3D06yhs4bdPfiBRNbWEFl4CUy9uh4WciDBkdP2rTQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tPWJBmB1yczFsyM+Wq7NKHNYtgeWsUV1Vr+VbyLNRwo=; b=8qspHbsUBHap/YauPCp+bNjNsolftSvlhtljbna9C5jJHBdM2e5qMzZaLhAbwtDQKJs43cQqMFvEFlgNE5oxZGCN7k4GNUiQ9TZCULpOmOMM60N0Y/7WCeVhRawiPx9aLlurs6Er7NWInAoFH+KjC04S5JAitr0DNts3Ww0Zig4= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) by DB8PR08MB5467.eurprd08.prod.outlook.com (2603:10a6:10:11b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.27; Fri, 20 Jan 2023 17:33:33 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::eed7:25a3:e4ea:187a]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::eed7:25a3:e4ea:187a%6]) with mapi id 15.20.6002.027; Fri, 20 Jan 2023 17:33:33 +0000 Message-ID: <46bf0f45-6469-2d1d-f6c0-6ae528b749d3@arm.com> Date: Fri, 20 Jan 2023 17:33:32 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v3 1/2] gdb: dwarf2 generic implementation for caching function data Content-Language: en-US To: Simon Marchi , Torbjorn SVENSSON , gdb-patches@sourceware.org Cc: tom@tromey.com, Yvan Roux References: <20230119102948.3069226-1-torbjorn.svensson@foss.st.com> <1ca2f916-21be-1627-7cc8-50da1a773cb8@foss.st.com> <05b54824-e13d-da77-1244-39dc65af3056@simark.ca> From: Luis Machado In-Reply-To: <05b54824-e13d-da77-1244-39dc65af3056@simark.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0521.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:272::22) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|DB8PR08MB5467:EE_|AM7EUR03FT005:EE_|PAVPR08MB9627:EE_ X-MS-Office365-Filtering-Correlation-Id: 82017293-889a-41a6-0787-08dafb0c7973 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 6CINz29T8hMeZXj4+Lntmmm/WzZfYawg1sVuH8QfYTvQZoW7VPlEXlh6KYOxZpSEj1WyiU7/LhtMoVzLqZCoQ61rogks+n0e+8w8TcQrdIC3s5E+/q3lwDH0w0WST0sH8JX0sU/+yk+eHqPmDBqtopaoI+orSb8+kQ6uhJuPIzn1AuQvhbe88Wo6b4pzuvw3jmO3pr2hr+mFgPI/g81RxeP3i4NMXlSdHeUs8SE2LczSp8zIKQrP/bKneNEBc5VgPbXVNuxPbAFid8i3txa5aF5YDI3NLgcmvQ/UdrkZxAY7dZnfAc3O5qVHyn5ThllI/lA8LEad8Ci6mPuHmsPX6oM7b7oqnZCja27K9XOc51QCUZlCr8zHjfxp6pBqzHE5pcaRDkK0nrkj5EQmfpeU1PH6OZX3NNBYnr0V9R9wBj6SqZZqf4IrKzE6AEYonpexgsN3w1+zfvpad/OxmZ3t2EM1d810Mh/fxlS5vHx0S1DwCFrd61v+RsNW6QVj0wkWYgLHDeJ4W63Rt+R2pDP4tfIGm17ijtlZ0xIsVW72DRRN92euyxKyrjQARZbTFTgLtncroJhQ2tNc+z7jrB48NUNkk1wIw5z1G74QceES6Z1Vsd8UMiAjbNMipZIZYVc5uWtBIVXL4V//aeexW3cv5ONFMtCvLtxhySogSI9Gc4SPO4hpZ1kroKNUpv14aixbavgox4jQyOtLgyJTmn643ecNR+CCuc7kiV78ospNpvGbq6Il0xdSCnNIEURkDYyM X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR08MB3919.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(346002)(39860400002)(136003)(376002)(396003)(451199015)(66899015)(31686004)(31696002)(36756003)(41300700001)(8936002)(66476007)(66556008)(44832011)(2906002)(86362001)(5660300002)(83380400001)(38100700002)(478600001)(6486002)(4326008)(110136005)(8676002)(316002)(6512007)(6506007)(186003)(2616005)(53546011)(66946007)(26005)(41533002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5467 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT005.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: d61fac1a-80ce-4c74-e10b-08dafb0c7396 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x8RelgZf8Ng5ALsolvivQH5W0Vps2kgffuxtV7Zm3FWyEXBQcacf0WkW5a2su7eSxtxsHruwB0EVyw4KjSExAkfiiZl1C82Mj4crr8JwV0Va9kQvKf4hTBkQlZeEXDXo+Ta6mxx9pHRnRq2/sHTf5BEG3EvsGeezrs6waH0ijEKTszOC1CeWCgXtWf9TIljWv1TdNxc8n0lh7QDynR3BhklNSbitUmuyeShbaGdGr2sJ87w2GKe5dMM3Ciuo/9RIB1fX3lErkl6HgmjdmWuBQBZHUD2g1LIyd5boBpMIUByNikys3eyoD4e2OphiDE2Ts8EsPccF+qVlb1cTGLIP6WEw6Znw2+v4ejUaaeEdGRVfvChqbMmZGSLoCvvdRJTJSdqK2BUf996bQPUjqbh8C7TYy06v+93vDG85WKc9ctUITfE4J1y8uGvFKZJanWvVThdIRc7L3pvv7EeRZAq9X+q2r8PrqaFMhVGiCnDurQSKMYaXClwP8uv8ZK4UPQxSiWpL29gORh53nR+eq/9W3m5NXkOSbDVModBfY1jsspAWp7vqfQJzReIjwh2jhFLW/EaXwIsIx8OUUxU51VDHcj0yjsDEbOi3bhmuSpX1M9eArw2LOtbwJbKhQMNN6eeg3OiENS29GUULw4++pk7i/jSwvj5So2ByLCzoXMT6eq7i9TDVY7ozKcrYkFha8PxYobu+DmWoQACc8K6tnys3/8VZFQzifEgFQa5tWIYcaWDEkClGM3Be46PA40bDmScD X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230022)(4636009)(346002)(39860400002)(136003)(396003)(376002)(451199015)(36840700001)(46966006)(40470700004)(83380400001)(40480700001)(40460700003)(47076005)(336012)(4326008)(41300700001)(44832011)(70586007)(53546011)(8676002)(478600001)(26005)(6486002)(186003)(6512007)(8936002)(6506007)(5660300002)(82310400005)(70206006)(316002)(2616005)(110136005)(31696002)(356005)(86362001)(36756003)(2906002)(81166007)(82740400003)(66899015)(31686004)(36860700001)(41533002)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2023 17:33:42.1482 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 82017293-889a-41a6-0787-08dafb0c7973 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM7EUR03FT005.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9627 X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,KAM_DMARC_NONE,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 1/20/23 17:28, Simon Marchi wrote: > >> I suppose a generic cache might be useful in the long run, but it >> would have an impact on other code paths and I'm not comfortable of >> doing this major change now. Doing this change would imply that almost >> everything related to unwinding is impacted in one way or another and >> I suppose we would need to test that. With the solution I proposed, >> only Arm Cortex would be impacted and the scope for testing would be >> rather small. > > I understand the feeling. It's impossible to test every change on every > configuration. We do our best to understand the code and how the change > will impact different configurations, but we also have to accept a > certain level of risk that we will break something, otherwise we will > never change / improve anything. More eyes on the code, more people > testing regularly with different configurations and more configurations > on the Buildbot can help mitigate that. > >> I'm also aiming to resolve this for GDB13, so doing this major change >> is a bit late in the sprint, right? > > Indeed. Then I think it's fine to introduce what you have, and then we > could replace it with a more general solution later. > >> If you have a better idea on how to cache everything, like in your 3 >> ideas above, please don't hesitate do share the implementation. :) > > I imagine something simple. A hash table in frame_info or somewhere > else, where frame_unwind_register_value would put values returned by > `next_frame->unwind->prev_register`, which would be returned directly on > subsequent calls. This makes the assumption that a given frame info > object has the same unwinder throughout its lifetime, and that it will > return the same register value throughout its lifetime. I don't know of > any situation where that is not true. > > To keep the allocation / deallocation cost down, the hash tables could > be allocated on the frame obstack. Maybe not a solution for now, but can't we use something like the trad-frame structs to cache values/locations of registers for a given frame?