From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#65700: time when gcs-done is updated needs to be clarified Date: Thu, 07 Sep 2023 17:47:18 +0300 Message-ID: <837cp2yr9l.fsf@gnu.org> References: <83pm2uz6nv.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14336"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, 65700@debbugs.gnu.org To: Shynur Xie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 07 16:48:22 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qeGIw-0003Y7-Bw for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Sep 2023 16:48:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeGIg-0000ti-Ng; Thu, 07 Sep 2023 10:48:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeGIc-0000tR-VV for bug-gnu-emacs@gnu.org; Thu, 07 Sep 2023 10:48:04 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qeGIa-0001cd-Hg for bug-gnu-emacs@gnu.org; Thu, 07 Sep 2023 10:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qeGIb-00017n-PM for bug-gnu-emacs@gnu.org; Thu, 07 Sep 2023 10:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Sep 2023 14:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65700 X-GNU-PR-Package: emacs Original-Received: via spool by 65700-submit@debbugs.gnu.org id=B65700.16940980644202 (code B ref 65700); Thu, 07 Sep 2023 14:48:01 +0000 Original-Received: (at 65700) by debbugs.gnu.org; 7 Sep 2023 14:47:44 +0000 Original-Received: from localhost ([127.0.0.1]:40866 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qeGIJ-00015g-NA for submit@debbugs.gnu.org; Thu, 07 Sep 2023 10:47:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qeGIE-00014g-Jy for 65700@debbugs.gnu.org; Thu, 07 Sep 2023 10:47:42 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeGI6-00011N-OD; Thu, 07 Sep 2023 10:47:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=jTQQEUGmZ87me1VliKK+PdpYPkHDubfcmof8sxDHTWs=; b=ozuGDwUbjPuE 6rTnVbiN33nvZj5dKW6a6GY8w99nWYLcTW9JawMbgSH+CnUWMtBwkkUIlxmSHgwCBCBbgazMuAajO Orp58XyCKpu9xYWABH3wTwa81CxdTmV5pdPzyHw2hryImgxpOgBJYCLTZO4y8YQ0B2VpsN7X9fG0N /ZV6JyslT/fvEY2pzzaix3hSfJnEQVlopAOgOu7zb+nV4c/nmOchbeFwe0lenXxGfpOpymF+zKTCw SxlBrtemkOmrt1rGwFEHChR0qhDL20Bnuh/i3KKjFEwpNx9DTFwKZ7FdTMUA+pzI0RFkANEb8oPwN hdEzd3kzgQY4uoZsfKSZhg==; In-Reply-To: (message from Shynur Xie on Thu, 7 Sep 2023 14:35:32 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:269670 Archived-At: > From: Shynur Xie > CC: "65700@debbugs.gnu.org" <65700@debbugs.gnu.org> > Date: Thu, 7 Sep 2023 14:35:32 +0000 > msip_labels: > > > Stefan: > > I'd be curious to know how it affects your code. > > My Emacs displays its runtime information like this: > > Since it's mainly related to GC, I have it updated after each GC. That's just causes off-by-one count of GC cycles, no? Easy enough to fix. > > Stefan: > > "Philosophically", both choices make sense (either consider > > `post-gc-hook` as being part of the GC or consider it as external to > > the GC). > > I'm not a native English speaker. Does the POST in `post-gc-hook' > mean the functions will run when GC is DONE? Its being "done" doesn't necessarily have to include updating the count of GCs. The main job of GC is already done by the time the hook is called. This is what Stefan meant when he said that philosophically it is not clear-cut whether updating the count should be done before or after calling the hook. > > shynur: > > Is this an intended behavior? If so, I think the docstring of these > > variables (such as `gcs-done', `gc-elapsed', ...) need to clarify > > when the variable is updated. > > And `garbage-collection-messages'. What about it?