From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Q/8LImRVcmNlWBgAWB0awg (envelope-from ) for ; Mon, 14 Nov 2022 09:49:08 -0500 Received: by simark.ca (Postfix, from userid 112) id 7A2D51E124; Mon, 14 Nov 2022 09:49:08 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=vlbSWooA; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 2BC911E0D3 for ; Mon, 14 Nov 2022 09:49:08 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 975A23858280 for ; Mon, 14 Nov 2022 14:49:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 975A23858280 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668437346; bh=FRb7VHuU1DEkvh4YhGKyBm/IVQi5Leq7y+WFv0M8GCU=; h=Date:Subject:To:Cc:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=vlbSWooAz4RAGGqUcJPeKxpI2BxH64lVNz/XYLfiz5784nt197DskJtvUqMLOLEDT TUfetxsR25Lo5jWUJ93RQ8mv/C0kQU3pfqbnuNOdkYSUcQok7l+sJgMGz27DD4HePA sZvAgq7SAYF86GOgbxa5B8zjyykPSfAiqSB/jXAw= Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 413B03858C2D for ; Mon, 14 Nov 2022 14:47:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 413B03858C2D Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id B82FC1E0D3; Mon, 14 Nov 2022 09:47:38 -0500 (EST) Message-ID: <5a0a91a5-fc65-c9e9-89ea-035884b9c867@simark.ca> Date: Mon, 14 Nov 2022 09:47:38 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: memory increased rapidly when adding a break Content-Language: en-US To: DeJiang Zhu Cc: gdb@sourceware.org References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: , From: Simon Marchi via Gdb Reply-To: Simon Marchi Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" > Thanks for your detailed explanation. > Yes, it's `utility.h:560`, I added this break from vscode. > >> creating some internal data structures to represent it > > I wonder where would allocate so much memory, (at least 40GB), > while the binary is 985MB with the whole debug info. > Maybe many match results need too many memories? It's hard to tell if it's a GDB bug, or it's working as expected, just that GDB is inefficient. If you end up expanding all CUs, it's not unrealistic. I've just ran gdb on itself, and did "maint expand symtabs" to force the expansion of all symtabs. htop shows 4.6 GB of virtual memory used. So I can imagine that for a project 10 times bigger, it can take 10 times more memory. >> >> Although I'm not sure this is what you see. >> >> Is the project you build something open source that other people could >> build and try? >> > > Yes, it's an open source project. > It builds with Bazel and depends on Go, which may be a bit complicated. > This is the doc for build & run. > https://github.com/mosn/envoy-go-extension#envoy I'm curious, so I built that, but then I'm not sure what to do, how to reproduce your case. Simon