From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-120.mimecast.com (us-smtp-delivery-120.mimecast.com [63.128.21.120]) by sourceware.org (Postfix) with ESMTP id DC7B538618E2 for ; Thu, 18 Mar 2021 18:38:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org DC7B538618E2 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02lp2059.outbound.protection.outlook.com [104.47.37.59]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-558-5x-Uj37jNSSFbQy8jhkR_g-1; Thu, 18 Mar 2021 14:38:06 -0400 X-MC-Unique: 5x-Uj37jNSSFbQy8jhkR_g-1 Received: from MN2PR05MB6541.namprd05.prod.outlook.com (2603:10b6:208:df::11) by MN2PR05MB6032.namprd05.prod.outlook.com (2603:10b6:208:c8::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.10; Thu, 18 Mar 2021 18:38:04 +0000 Received: from MN2PR05MB6541.namprd05.prod.outlook.com ([fe80::896e:1520:f83a:d2d7]) by MN2PR05MB6541.namprd05.prod.outlook.com ([fe80::896e:1520:f83a:d2d7%6]) with mapi id 15.20.3977.009; Thu, 18 Mar 2021 18:38:04 +0000 CC: mgulick@mathworks.com Subject: Re: GDB memory usage with compressed debug info To: gdb@sourceware.org References: From: Mike Gulick Message-ID: Date: Thu, 18 Mar 2021 14:38:02 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 In-Reply-To: X-Originating-IP: [146.115.133.179] X-ClientProxiedBy: BL0PR1501CA0010.namprd15.prod.outlook.com (2603:10b6:207:17::23) To MN2PR05MB6541.namprd05.prod.outlook.com (2603:10b6:208:df::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.136] (146.115.133.179) by BL0PR1501CA0010.namprd15.prod.outlook.com (2603:10b6:207:17::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18 via Frontend Transport; Thu, 18 Mar 2021 18:38:03 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e7ef96f2-6279-4c47-a026-08d8ea3cf745 X-MS-TrafficTypeDiagnostic: MN2PR05MB6032: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: e/YckTnAzlnlB+3uNoFGC+d1+aCLpLlymol8HDlXiXrfo3bJAygnNJewQ9ED3jU0etlj+V+iexqRWWgp19gVIe7hCBWnoEPMsH9Hqg2HXWpIVNXzfHVGeV+7UtqOrx4S//dU3n/Yp2X/39ywcimewVE8/5u8bBl8/d6E9rEPW+0u/FuBF+hBGvkQlnInJnyVMg74toq195bxS+FbWcv9Xf1q5rymryBzhJWheNV6KyqoEUXYvdCgMucRa+4c/2F73mktVgdUxMQ9I/NHWeGgkjgODMGBj8dM6fgT5h+K2lNTee9LRBsxhlOhOQD0BQ+jTagAgqsc1U9bl5tAe6m2zehx87pWC7acYopMi06C5XfeNzkc0uxd0G1hAvJ07Pf56Dl+OXqKza5JU0BS7EBzHjOVRGzmCfUT+uT91qkWgn+pzvOTDrQ5CQ5xtsMQfba4o8JCKK0e+pJ0svUmxTq8MQJbBlYb3H6jTPBEyJyZ53aEubGYwGHdRrQXWZ6E9cJGRktAycf+8FrcSClLmZoBMZPxhDyiuS8QJwlwhJYmrGpzbnxdF+9TcBn5AmegV6dtxzs7xZr5zr3sicUYzbWScsFAqmSS98uxRW7717aSARNm1vuQ1Y485IqavoWtzbPWZAMpWE1i3G947Lt618NMWjbam9lmEOFsTces7smrs8U1vCNBHHsN+0iloaHh0dqz X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR05MB6541.namprd05.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(376002)(396003)(366004)(346002)(136003)(53546011)(316002)(66946007)(66476007)(66556008)(16576012)(86362001)(2906002)(52116002)(4326008)(38100700001)(107886003)(478600001)(2616005)(6486002)(5660300002)(956004)(16526019)(8676002)(6916009)(186003)(26005)(8936002)(36756003)(31696002)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1101 X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?RaambKfGnx5uW8/Ve9HCnlGircZYkh3ZCC05zeGbpQbJLoTYtdWeKLjTx9z1?= =?us-ascii?Q?8prgv4NUjKGOi8dpFJv+wAUlmDInbpKgpbZiSlF5dapXe/No6BEwYiiBwdNJ?= =?us-ascii?Q?G7OURMNkGiwvzftpUjtLN7UfE1DAJOPYa8diJg2EJN159hcbZppo+CIiLzgz?= =?us-ascii?Q?abzipcqqwKIDMWI7TlgYU9klk6iNFCoxlusmLLPn8V+g1QBn0LJ9nqH/OpV/?= =?us-ascii?Q?R8FYOz9vN8Jk11bSO+w1jRmL9f5pOz1m6oK3tvOrCaXWm/vaNdwPf4MrgNrn?= =?us-ascii?Q?unHt9Iw0FlYNtITDlN2164DzcMVLGRVRC1lE7pd5mphFbgPoH2758jly5KUV?= =?us-ascii?Q?lA8zRy5PUTDpB1ROh8yzWd4ObjmabH5Nr01LKBXHd5GiPkkP/ddjjS51cN/n?= =?us-ascii?Q?C0Fjb7PlmwCuDT3mPDW+LOOk5kF4uFmI9HFx2mXRYjzfqjThHodZhBayMxvU?= =?us-ascii?Q?Vc2yGQHUefWbIoQ5cmD3aADg2AEajVRFYERQmoqyO1LY+EKQdei6A7mRsdrx?= =?us-ascii?Q?VF5bfjdv0MBG0OvTNhnzfwi/yZpck3WFiCAIZ+UFO+6zi8buGm/0xfiJSvcC?= =?us-ascii?Q?jLEN7sYjje5JXmAUsJd5sq2Z+ejyE7q+xlYhUHNP26MGPceUrIvrSkFxvguR?= =?us-ascii?Q?PttDoIsDwvop2sms0vqlBJzRHirlDvQajLrWBZ1iakvEgNKwXivhcmTqnt5l?= =?us-ascii?Q?vONbVeXbwoCuDTaALxhB6Na0S5YB5EOfPCQ4f5ROE2gvuOF5M6mKOBJDvZod?= =?us-ascii?Q?PuJHJpW01jd0ULCJ4mlOvsjRV5ciMc7XKarBj1nEHBZ3LEQiAijVUZP/aovv?= =?us-ascii?Q?XP3v3Z8lUm1N8J5e7tuBogmiG+6juzy9K3+sPlILFQunjLqacwsm64jnesDK?= =?us-ascii?Q?Q6IeGCVTKnGwSdIvnlKA8cXoEoXi+cFU+apuRvhwCFVohOZHlM8TNs8bRLE2?= =?us-ascii?Q?HTCAAxszd8IVCvOkjVu0dF8FHUyN7MTnIe+aWR18KMhrOBsRjF2EI07vm4w+?= =?us-ascii?Q?jDd47PiQg+EODmbLIbrxAnjyrtEPpXR8a0ZHiSmoIMkd4/PKnEhsnXFjzqUN?= =?us-ascii?Q?Dmaq7s2NzlpNKNGsTSMbZGXzFSckjrKdsJpiY5OnPlYbUHJ0rRw5NMIIFNv+?= =?us-ascii?Q?j+G4WLlviq5Bdp2uq79bAqHnh/uwtjF+8MuNyYpHHo/Cb2kDnM5WI/vyLres?= =?us-ascii?Q?vl0T2subE3YLUate0XhiASqJPkrMsQKV3j3zzMMOON6B6RgZsGdc9tXKHNCH?= =?us-ascii?Q?mM6K7n9sFHJmO8NlD0f7zMbnIaQ0qxCk61AXLBK3/lNdm1+lR/JQzgbQVfXI?= =?us-ascii?Q?f20QOVg4KGRoSKpXZn4Baq6K?= X-OriginatorOrg: mathworks.com X-MS-Exchange-CrossTenant-Network-Message-Id: e7ef96f2-6279-4c47-a026-08d8ea3cf745 X-MS-Exchange-CrossTenant-AuthSource: MN2PR05MB6541.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Mar 2021 18:38:04.2026 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 99dd3a11-4348-4468-9bdd-e5072b1dc1e6 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dFUOMjRWEdFj77bLglAFT8++C2BCvBqHzBKS4GV6Mx/4pkYw5cNBaY8l0l7lba2UolWaMex5rByQHIoqNKnUaw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR05MB6032 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: mathworks.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, MSGID_FROM_MTA_HEADER, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2021 18:38:10 -0000 On 3/16/21 2:40 PM, Mike Gulick wrote: > Hi, >=20 > I'm observing that GDB memory usage is much higher when I have debug=20 > info compressed with 'objcopy --compress-debug-sections'.=C2=A0 In a larg= e=20 > C++ application, I see the instance with uncompressed debug info use=20 > 46GB VIRTUAL memory and 11GB RSS, and the instance with compressed debug= =20 > info is using 46GB VIRTUAL memory and 42GB RSS.=C2=A0 In case it matters,= the=20 > debug info is separated from the original binary into its own file. >=20 > It seems like GDB must load the full uncompressed debug info into memory= =20 > when the underlying files are compressed? >=20 > I'm currently using GDB 9.2.=C2=A0 I checked the 10.1 NEWS and didn't see= =20 > anything that looked like it would have changed this result, but I'm=20 > happy to give it a try if you think it might help. >=20 > Is there any chance this could be improved with a patch to GDB, or is=20 > this just the nature of compressed debug data? >=20 > Also, FYI, the NEWS link for the GDB 10.1 release on the GDB home page=20 > points to the NEWS file for the 9.1 release. >=20 > Thanks! >=20 > -Mike I should add that this high memory usage only occurs when there is a=20 FILE:LINENUM breakpoint set (or pending). I can run the application=20 being debugged, observe that GDB's memory usage is around 11 or 12 GB,=20 then run 'b foobar.cpp:123', and the GDB memory usage will climb up to=20 42 GB. Interesting that symbolic breakpoints don't trigger this high=20 memory usage, but line-based breakpoints do. Does this seem expected? Thanks, Mike