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:43:40 +0200 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="16059"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Ihor Radchenko , Eli Zaretskii , emacs-devel@gnu.org, eller.helmut@gmail.com To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jul 04 20:44:10 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 1sPRRC-0003xS-2S for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Jul 2024 20:44:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPRQq-0002IG-Cp; Thu, 04 Jul 2024 14:43:48 -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 1sPRQo-0002GQ-5T for emacs-devel@gnu.org; Thu, 04 Jul 2024 14:43:46 -0400 Original-Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPRQl-0000jI-UL; Thu, 04 Jul 2024 14:43:45 -0400 Original-Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-52e9b9fb3dcso1006335e87.1; Thu, 04 Jul 2024 11:43:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720118621; x=1720723421; 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=jrn34FNQ8qwBFstaB5ueODblzTnWT5dMrfOzA6TH7pQ=; b=R7YVh7/mKFrfQQpQR0HH1CtwYAqOBOK50F3L6co9ZqPnyta6EgHVnXe+UgrLYeKg4C 08+PMmX6w3lj9FkdHOOZwTq6SjL8j8ZjXA3SQ1FQY2Sqjou4nnoxfBXgf6nc3/LL6URq BSAnUuYWJHPKTt+qcc/YFx7e9l+afojjRj3beoZnmhRNv6zqD4u1pO2TQYQ78Bz8fFMm mqhVxOBvpqPJoVgLxiFfOps5hms5QdwgwpZr10RNW651zESMqvFcdeidmKxUK2c3knlc V8ghHx3zp5U66a1cwL3ligQOGRrZ11rxJmGxazzW2Blw3+NfTf7I6MTm8PHvtRcPJH9T V50A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720118621; x=1720723421; 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=jrn34FNQ8qwBFstaB5ueODblzTnWT5dMrfOzA6TH7pQ=; b=ePGrNSoE23GfdBZ1HT65mExI1w98DNkqpgQ1s8o6v6WIOYx//8U15h7INAzwFNdbSC eHpkeD8WA1G9szK+QnTo08/qSbiAodGK4sCtKdjWA5Y8mtmPnTw5oGZYlMJo0EOCJi5/ fw6ngEoDthPKABF/69Fq+bxhuIrV2o3Sr9uAKOhlGPO2/+9GvFfhtjs1WzUBUWMCJ0+r 8LQL6VnVN8Ok/zXdBrIyYmljTfI/v5FECzFYalQ2X4zk0c2rtS3pC/+f4F6Mc6HNahhp XtvWgMB6fbkqiyy6FD/gB4SjXTni5HbMUA5sv+3KuUEl88ci4ziR8+cJG4/DnB8GOQDy zFTA== X-Forwarded-Encrypted: i=1; AJvYcCWit3XSrC9UTHL9GtTRq6Q1WIY5lkdV9GwxA7c0+cStwK/M6fl1Z/YlkYS5wLq9xXb6qxt9KO7SC/V0EWEgUIqDDmQC3AaoRddvM75RsI2Wcc4= X-Gm-Message-State: AOJu0YyTV+hmYFl67ZwBx+N8V0K16OS0sPr4jDrm856dJ1D0tMhcsbql bfuRjo1ArOpWO2LQoWf4c2UJiq91mjdphs7ms9p1GCoKzqcx56Y9 X-Google-Smtp-Source: AGHT+IG+VyWHmouHwSjT20aHGf9VP0NQii+/XKBgrlA0DZBPU3XPAakQblZeaOFRm+iW1CE/IEwxnw== X-Received: by 2002:a19:6908:0:b0:52c:9725:b32b with SMTP id 2adb3069b0e04-52ea062dcddmr1778091e87.17.1720118621279; Thu, 04 Jul 2024 11:43:41 -0700 (PDT) Original-Received: from pro2.fritz.box (pd9e36fa8.dip0.t-ipconnect.de. [217.227.111.168]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a72aafba2cesm621111166b.93.2024.07.04.11.43.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jul 2024 11:43:40 -0700 (PDT) In-Reply-To: (Pip Cet's message of "Thu, 04 Jul 2024 18:32:12 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::12d; envelope-from=gerd.moellmann@gmail.com; helo=mail-lf1-x12d.google.com 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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:321354 Archived-At: Pip Cet writes: > 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 = an >> > increment of its work. While in dflt_scan we get SIGPROF and land in t= he >> > signal handler in main thread, and the profiler sees in_scan =3D=3D tr= ue. >> >=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 th= at >> > 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? I don't know. I only wanted to contribute something because I appeared to be confused. Or maybe were confusing me. Whatever. I'm not thinking about profiling otherwise.