From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Memory usage report Date: Fri, 18 Sep 2020 13:47:48 +0200 Message-ID: <871rizjogr.fsf@gnus.org> References: <87lfh8kyot.fsf@gnus.org> <83k0ws5hzt.fsf@gnu.org> <87h7rwkxtk.fsf@gnus.org> <83imcb61p7.fsf@gnu.org> <871rizl5mf.fsf@gnus.org> <83r1qz48h3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15628"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 18 13:48:48 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJEsi-0003vG-6a for ged-emacs-devel@m.gmane-mx.org; Fri, 18 Sep 2020 13:48:48 +0200 Original-Received: from localhost ([::1]:37694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJEsh-0007Nq-94 for ged-emacs-devel@m.gmane-mx.org; Fri, 18 Sep 2020 07:48:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJErt-0006pc-6O for emacs-devel@gnu.org; Fri, 18 Sep 2020 07:47:57 -0400 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:42890) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJErr-0005tK-Bf; Fri, 18 Sep 2020 07:47:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=STk266aCvPRrfd971SWwP4nfoQEGQ7Fx2MtC6+HnKgU=; b=euMlT9+EzlEKo1C595BLwFk/3r jCR5A0RpSBTHIRqusxdSH3LktaNChRulh78I1cZlhva+60elYvdhwYujF6NPeA/Gli77sptRGY7m6 CY1xAP7a3sa/mVfsLMvI7ltMVdhb6vST82I1fbMd9CvvJ2g3uirJYlB8RrIROp5EJj6s=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJErl-0005Mv-A6; Fri, 18 Sep 2020 13:47:52 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEUPDBVJRlF5fIPJ ycn///+aolA5AAAAAWJLR0QEj2jZUQAAAAd0SU1FB+QJEgscFTH+WAYAAAGUSURBVDjLjVMN1uMg CERzAcELBHKBXbj/3XZE89Nu+72PvJrUARkYJPpqbf7KN7y0l7/8Gnl5FLsBhRvzCcQVU3zlyaX6 fVgbEa1lQC36kh8nwY+NusQHToClLfYs2p4Mr7JETcWuKLhsE7bww02ZZxYZgFL3IuER8fdwxFnr 0eigaIIqeWeJVjhZ9KDW75Q1/EpylwESR/ietYy2yNgTzajIiKKoD3CGsVLZaWRnFhu0SzYAVrgo gDBsm3lSCMPhFU/uw1BspoWPKEINJ70JftL1n6bizay1Jcdrd4u7pg5gSK3G8NpoMEdtxj3czXmf A7IRGtsBHKOMUJY1f/0BuD71JTGtlhrt9BuTb7UI+iUsqXiB9OgX1D12JI/b+vXloJvv/4H6OeLP CRxhDrkgxhgtG6qTZnle8lLMwhfBbR6aA8n24D0AuUSqNpuPpYOT+Xlpq87TCnly8dpugWaDF8nn zVlAJg962HTybeh3nAEQHkM/rpdmTbkwl7W2ikEzi8OmyXyxjbu5umPvRo/vFaC5/gOcpklCLuk+ uAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0wOS0xOFQxMToyODoyMCswMDowMG9taZgAAAAldEVY dGRhdGU6bW9kaWZ5ADIwMjAtMDktMThUMTE6Mjg6MjArMDA6MDAeMNEkAAAAAElFTkSuQmCC X-Now-Playing: Stina Nordenstam's _People Are Strange_: "Like a Swallow" In-Reply-To: <83r1qz48h3.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 18 Sep 2020 14:42:16 +0300") Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:256076 Archived-At: Eli Zaretskii writes: > Yes, but that's a negative evidence, so it doesn't give any hints > regarding where to look for the problem. It's negative evidence, but that's useful, too, sometimes. >> But for this command to be useful in general, I think we'll have to >> expose more data from the C layer. What caches and stuff do we have on >> the C layer that can take a significant amount of memory? The image >> and font caches? Uhm... Anything more? > > We have a legion of them. That can have significant memory? > The problem with reporting that memory is that we'd need to monitor > calls that free memory as well, and "forget" the chunks that have been > freed. At which point we will probably realize that there are > memory-debugging libraries out there, and it's probably easier to > build Emacs with one of them instead of rolling out our own. I don't think we have to go that far to be useful. Reporting that the image cache takes foo GB will help somebody. >> I'd also like the display to list, say, the ten "largest variables". > > Which variables did you have in mind in this context? Can you show an > example? It'd just traverse all the variables and compute the "largest" ones. >> And I'd also like to do the same with buffer-local variables, in >> case a lot of data is hiding there (for instance, the eww-history, >> which caches old rendered versions of web pages, and may be large). > > But those are part of the GC report, aren't they? Yes. It's a more detailed look at what's holding on to the memory. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no