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.devel Subject: Re: Some experience with the igc branch Date: Sat, 28 Dec 2024 18:27:33 +0200 Message-ID: <86cyhbsrgq.fsf@gnu.org> References: <87o713wwsi.fsf@telefonica.net> <867c7lw081.fsf@gnu.org> <86cyhcum5d.fsf@gnu.org> <87h66nnbuy.fsf@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16421"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, stefankangas@gmail.com, ofv@wanadoo.es, emacs-devel@gnu.org, eller.helmut@gmail.com, acorallo@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 28 17:28:31 2024 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 1tRZfz-000475-1x for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Dec 2024 17:28:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRZfA-0007C1-Rk; Sat, 28 Dec 2024 11:27:40 -0500 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 1tRZf9-0007Br-2K for emacs-devel@gnu.org; Sat, 28 Dec 2024 11:27:39 -0500 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 1tRZf8-000700-5E; Sat, 28 Dec 2024 11:27:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=FuwbvlNwAeT9Gq+Ayo44JlnjbpCkdBFa+pSAD8N1ufk=; b=opWNjhjsugJKwvPzBucm 6TfUye4sJrwsZQWkoJQN8JnZ9GEerNYpziHNHkfY9TntcgWc3h3yudUNDBfXK/jgy9urpUogehXOc sLjdovlSTZyPPr1SVMXhFP58TZa7py/GINxDjFcAqRXvNmr5DLEnsCmG5GVh8cpxdIywSStfyqL4n LmyXL4OQfgqTfkQ7nv2ouOy5R8wWxzSXIlcJEWZNGonHTrVmpzl2Lb5GRNBl7lGiVyJE127Et5+86 3X+3V4LUHV2ubDnloiwsWtoMSxtOCBz0vTmd6Z4I8E/dcl7TK0MelBvsEcakoDjnWxpcrr8ZbqpBO /6pug5bQ+89Uxg==; In-Reply-To: <87h66nnbuy.fsf@protonmail.com> (message from Pip Cet on Sat, 28 Dec 2024 14:04:31 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:327276 Archived-At: > Date: Sat, 28 Dec 2024 14:04:31 +0000 > From: Pip Cet > Cc: Eli Zaretskii , stefankangas@gmail.com, ofv@wanadoo.es, emacs-devel@gnu.org, eller.helmut@gmail.com, acorallo@gnu.org > > Gerd Möllmann writes: > > >> If I run Emacs with a breakpoint in process_one_message (after > >> enabling garbage-collection-messages), all I ever see is GC triggered > >> by igc_on_idle, which AFAIU is only one of the way GC can be > >> triggered. Where are the entry points for the other GC triggers? I'm > >> asking because I'd like to run Emacs like that and see which thread(s) > >> run GC. > > > > I wonder if your interpretation is right here. AFAIR, > > process_one_message is always called from igc_on_idle. IOW, we handle > > There's a second call path when we create finalizable objects > (maybe_process_messages). > > > messages from MPS only when Emacs thinks it's idle, and that is always > > in the main thread. > > My understanding is, also, that process_one_message doesn't trigger GC, > it handles messages produced by GCs triggered in other places. But igc_on_idle does call GC, right after it calls process_one_message, so a breakpoint there will show when GC is entered due to Emacs being idle.