From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: MPS: User GC customizations Date: Thu, 04 Jul 2024 18:32:12 +0000 Message-ID: References: <87v81pbgzi.fsf@localhost> <87le2h47kj.fsf@localhost> <86a5ix82nt.fsf@gnu.org> <87h6d59flf.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10496"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?Q?Gerd_M=C3=B6llmann?= , Eli Zaretskii , emacs-devel@gnu.org, eller.helmut@gmail.com To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jul 04 20:51:05 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 1sPRXs-0002Wm-Rf for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Jul 2024 20:51:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPRXS-0006k9-VZ; Thu, 04 Jul 2024 14:50:38 -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 1sPRFm-00065W-Re for emacs-devel@gnu.org; Thu, 04 Jul 2024 14:32:23 -0400 Original-Received: from mail-40131.protonmail.ch ([185.70.40.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sPRFk-0003aH-L8; Thu, 04 Jul 2024 14:32:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1720117938; x=1720377138; bh=4xknwVypCUdYM5/8VhA71RtU8csPPjUA1Dhd765p58c=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=xjneyWk1cfautGqcIYQ6mbEpiezG72JxMDryhzcpvdR457K+DZaRL5UH7Iw2Tqedf 8CORhqPW1mRYrpvna8dT6wWU4KHUV/gbBj5ZVGgt9DsvScK7gdsfmgqt50pA0jcOq3 sSFJr+s6znJTS/KDjfrvFJL+SzeQxYgUYgHLPYr3gm6xoRPNcudESNYf01cTd7Y57r 1M/DXYw2+3uRTxCF//DU93OkkAJnh8yWDppk1HAI4tGNCtj1m8aJYYK4/lYTabF3wf 5pDWkOQxpTRxZorTL3uayoE3Hpdn4LGcKzSxxpnbpC48NsTHjymbsWhuDkTRIDexie KUA8qKpXegH/A== In-Reply-To: <87h6d59flf.fsf@localhost> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 3c75163abbe3f8128a65deb743e1118b74129eff Received-SPF: pass client-ip=185.70.40.131; envelope-from=pipcet@protonmail.com; helo=mail-40131.protonmail.ch 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 04 Jul 2024 14:50:35 -0400 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:321356 Archived-At: On Thursday, July 4th, 2024 at 18:26, Ihor Radchenko = wrote: > Gerd M=C3=B6llmann gerd.moellmann@gmail.com writes: >=20 > > Pip mentioned scan functions, so let's say we set a flag in_scan while > > being in dflt_scan. MPS now calls dflt_scan, in the MPS thread, to do a= n > > increment of its work. While in dflt_scan we get SIGPROF and land in th= e > > signal handler in main thread, and the profiler sees in_scan =3D=3D tru= e. > >=20 > > Q: do we count that as part of GC work that the profiler should report, > > although it happened in the MPS thread? I understood Ihor as saying tha= t > > he doesn't want that. >=20 >=20 > I think that we should ideally have multiple flags like this: > 1. when arena is locked > 2. when our dflt_scan code is running > 3. when we query MPS synchronously (e.g. memory allocation) > 4. when Emacs thread is paused by MPS 5. when our dflt_scan code is running on the main thread I think that's what Gerd meant to suggest, anyway? > Then, we can report statistics for each flag. Or each of the 32 combinations (okay, okay, 24). > I think that it can give us some idea about how different aspects of MPS > affect Emacs responsiveness. I think it would help me understand what in the word MPS might be doing. AF= AICT it Just Works. Also, may I suggest we really need 6. whether Emacs is "idle" Pip