From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: NS port: How to debug excessive garbage collection? Date: Sat, 13 Apr 2019 09:48:13 +0300 Message-ID: <83a7gul7te.fsf@gnu.org> References: Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="3644"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Keith David Bershatsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 13 08:49:12 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hFCTP-0000nt-4P for ged-emacs-devel@m.gmane.org; Sat, 13 Apr 2019 08:49:11 +0200 Original-Received: from localhost ([127.0.0.1]:47644 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hFCTN-0007Op-P5 for ged-emacs-devel@m.gmane.org; Sat, 13 Apr 2019 02:49:09 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51710) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hFCSj-0007No-VM for emacs-devel@gnu.org; Sat, 13 Apr 2019 02:48:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48421) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hFCSj-0001h6-KQ; Sat, 13 Apr 2019 02:48:29 -0400 Original-Received: from [176.228.60.248] (port=2326 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hFCSj-0000MV-0f; Sat, 13 Apr 2019 02:48:29 -0400 In-reply-to: (message from Keith David Bershatsky on Fri, 12 Apr 2019 22:55:42 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:235386 Archived-At: > Date: Fri, 12 Apr 2019 22:55:42 -0700 > From: Keith David Bershatsky > Cc: emacs-devel@gnu.org > > Thank you, Eli, for letting me know that my previous test was not the correct way to do it. I added a little bit of code from garbage-collect to garbage_collect_1 so that messages to stderr are automatically generated when garbage collection occurs. That's not what I meant. I meant to look at the values of the *_consed variables, here's the full list: intervals_consed strings_consed string_chars_consed floats_consed cons_cells_consed vector_cells_consed symbols_consed You can use the function memory-use-counts, if that's more convenient. The question is: which of the above counters changes the most between two GCs, and how does the answer to that depend on the version of Emacs?