From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: MPS: User GC customizations Date: Thu, 04 Jul 2024 20:18:31 +0200 Message-ID: References: <87v81pbgzi.fsf@localhost> <87y16khvhy.fsf@localhost> <87frspqwhr.fsf@localhost> <87tth5pdqc.fsf@localhost> <87le2h47kj.fsf@localhost> <86a5ix82nt.fsf@gnu.org> 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="4189"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: pipcet@protonmail.com, yantar92@posteo.net, emacs-devel@gnu.org, eller.helmut@gmail.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jul 04 20:19:29 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 1sPR3I-0000oB-Vn for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Jul 2024 20:19:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPR2X-0006a5-0i; Thu, 04 Jul 2024 14:18:41 -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 1sPR2T-0006Zf-D6 for emacs-devel@gnu.org; Thu, 04 Jul 2024 14:18:37 -0400 Original-Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPR2R-0002rY-1n; Thu, 04 Jul 2024 14:18:37 -0400 Original-Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-367818349a0so513314f8f.1; Thu, 04 Jul 2024 11:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720117113; x=1720721913; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mcPbobwa2j1Hyx09aJh0vXgVTLXLS1n/G/lMBM64UhI=; b=YpXND3oxymy6tWrLJqqk64abWt9CXJA8IEymuHF9cmvanNU5VwYnyLY2gJDN81tUTN jPWoUjhcBcAppUTg78r829AZ7GmrTTgkQEWdnyLelsKmFvD0ZAPsbdHqGSB1ouPs3Gk/ I8Bi3xe2iZumArPLfapOx4t8siOzsk/RTTnmvn6ZkdLw19G5WhF6vmtZ2l0BqUgBMrzr caDYU5w3/a0v+hNPQpzFml7SeKCpmkiVruYR22bAagzBnad4tmtgoc5bCHwvjyDP3I0b maI9W9tPScOUxQx8evbZVj4IvI1k2tukzDpCvS43BdM4URFuwSmhC8Bb5J0q0DoHJiKu 9jkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720117113; x=1720721913; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=mcPbobwa2j1Hyx09aJh0vXgVTLXLS1n/G/lMBM64UhI=; b=YKo49W5kC5kabaSVKt6O8FxkVulfVaLkjwjCmSvEpBUKmyNZQxgeIXB5vA0vgGqr+7 N9RRkRlBry8rVabVnBPpKtNTVbZTqiLLG4FVtphFn8owJVsGUdwpfJgLNoo1VsostQTK X8zVL8UF14s2BeZVuo5K9sdYYsWcv4vfsmh1gQnqd+41o+5REpWLgfO7YdgU9RWkN6rI rLINncp20dnL1Uk+A9fuxnrJAloTv4tF5q5U/1o7UPeGeioc1zZnPHChv2JIvNlKSF33 7h0oOr7YZDjiIfjDLWPx1C7O6ZhI2dsLkYOc9xk6/7SH25cikoVNbAOYTwmpCaT51aBO vauw== X-Forwarded-Encrypted: i=1; AJvYcCVVsauuBINXEnx+bWsSEUeSEgRyw6RFplOOVeLBOyvHf+tQ2o+r7sOk2leIHouoUUUB5PAWPuPiW5wnwEioGz2/aSuL X-Gm-Message-State: AOJu0YwDZ7N1QuQ0Cmok4FGw+CVcanzlguzlylxGCqINnDMpJcxVzEyU m0xgUGYTBUJ0LnAUFJWKrFpQss1orX9tCCwbHN2juNHZtP1RGFEv X-Google-Smtp-Source: AGHT+IHH5n//hYRfPlVCZUqObA7ZUaSflAM58WeeK81Esjl5US1Ht8Hbe3wg7Rs94VDTaQgJU5WWWA== X-Received: by 2002:adf:fecf:0:b0:35f:2067:2072 with SMTP id ffacd0b85a97d-3679dd67049mr1774275f8f.52.1720117112863; Thu, 04 Jul 2024 11:18:32 -0700 (PDT) Original-Received: from pro2.fritz.box (pd9e36fa8.dip0.t-ipconnect.de. [217.227.111.168]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3679983882csm2822132f8f.78.2024.07.04.11.18.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jul 2024 11:18:32 -0700 (PDT) In-Reply-To: <86a5ix82nt.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 04 Jul 2024 20:53:10 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=gerd.moellmann@gmail.com; helo=mail-wr1-x430.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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:321349 Archived-At: Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: Ihor Radchenko , Eli Zaretskii , >> emacs-devel@gnu.org, eller.helmut@gmail.com >> Date: Thu, 04 Jul 2024 18:07:42 +0200 >>=20 >> Pip Cet writes: >>=20 >> > I think we can just set flags for "called MPS" and "in a scan >> > function" and look at them in the SIGPROF handler to distinguish the >> > four cases? >>=20 >> Not sure. What if MPS calls these in its own thread? I guess that >> wouldn't be so interesting for Ihor. > > AFAIU, on GNU/Linux signals are delivered to the main thread, 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 an increment of its work. While in dflt_scan we get SIGPROF and land in the signal handler in main thread, and the profiler sees in_scan =3D=3D true. 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 that he doesn't want that.