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: igc, macOS avoiding signals Date: Mon, 30 Dec 2024 20:55:57 +0100 Message-ID: References: <799DDBC5-2C14-4476-B1E0-7BA2FE9E7901@toadstyle.org> <87h66loc17.fsf@gmail.com> <878qrxoayj.fsf@gmail.com> <8734i5o6wc.fsf@gmail.com> <87cyh9mpn5.fsf@gmail.com> <874j2l1hei.fsf@protonmail.com> <874j2lmd37.fsf@gmail.com> <87msgdkt29.fsf@gmail.com> <86h66lnjrt.fsf@gnu.org> <868qrxnfrw.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="24839"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: eller.helmut@gmail.com, pipcet@protonmail.com, spd@toadstyle.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 30 20:56:49 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 1tSLsd-0006Kc-U6 for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Dec 2024 20:56:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSLrw-0003uh-Hs; Mon, 30 Dec 2024 14:56:04 -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 1tSLrv-0003uZ-4Z for emacs-devel@gnu.org; Mon, 30 Dec 2024 14:56:03 -0500 Original-Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tSLrt-0005Dx-Hx; Mon, 30 Dec 2024 14:56:02 -0500 Original-Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-aaedd529ba1so837808766b.1; Mon, 30 Dec 2024 11:56:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735588559; x=1736193359; 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=d0v9Te8/d7/kho+eUmrMLISnj19zM9wtJlVI5PzCLxs=; b=FmJaVBkpHT6AovEqgViPzakp8rQ6t6z3Th7RBTpBDx35+/eJkIY9vSHlfjwO18TucW MIZuyDmDA04wEW+kEsNYvLptjA3Ck+sby0HkKeVLt97QOVDezGOrD6shxGP5u4VsKy5K lWLl0HTQqvKuRFkzoHJVP/s4rvFp4vMvHBPSbG93tCVcZx3Qt36gOu7YYYmusWsVl6Zz 5bm3eu4+p0xC35itqU2SkgEa5maNvLDLw3/Ni66zmSRw75a68KI3FVjo67h5YTrExEdM BeoMDx/5HlkGFSLhCEf2uLXhWIROproKv81G0KWonRFauaKemQF32ODw0Ibm/zBeSznW XhAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735588559; x=1736193359; 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=d0v9Te8/d7/kho+eUmrMLISnj19zM9wtJlVI5PzCLxs=; b=Qk8SUis44tww0bloOEWr7C4gjz6q9uJGPc6aFlaSMJZtD9kyDP36r1u4Sq2sUjERC5 tlvxY54wxRNBW5Pok2imPmGG2W4K8UUc04IX95auFO5a55LBn/PiLKYfUHuy6wrlAg+s VXZegm7+NNrTGOXQofCmTnp9LEPqW2+A6ZN5gyZd09e0o4W5aTelgMn9X+PKimKLngBz 4ZhQBpW9lwOxgWnrlTSQJE5cpA8ht7aYRubncfve14LqYEav5e0LlZdBNrot7edZLDNS lJAB+1fNHiVsTyvup8fVKbauuHNfvnN3XeYYMjCDITFQuLm7g1Sb31Oi1lLLDZW31u/2 OSSQ== X-Forwarded-Encrypted: i=1; AJvYcCUXY6+FlvMfxGJOP0L6U3MkNPQc+U4PxvRiDeQh1Qh1IcyvgvanPUbI/deukQGO1/XY737784nnnVqD0w==@gnu.org X-Gm-Message-State: AOJu0YxBt6hh75L3brX2/7KCbmpSD2o16uDJehvHPm2cTegidUKgqqj6 VP4f0D26CJQLR7LN1Eepto4wbU2JYqszbZtgh73dV86va+Wqzn7QFFhB8D5P X-Gm-Gg: ASbGncuFQb1X19boP8qRG8T1Yzsmk6tuJm6HPTTf9ROcKk12PxZmhb91fsg2vaeiH0V 3Vj+w76hCxQp8B39GwEpbwujzCHuU/TWEcjMMANSWalLzeXpPSLojIl7lO+aZHgXNhJOYCRpUzS vh9PuPdFNhJ68NHnqGAyN5qRk1TzoCOoEQ6XVXNGDk09ShYXHZ+fEOcnFzpvZRneJ3dSRiYgUJm HbL1x3z/3oKWxXeflNiSV3RN8nzp6++Go6/9Co3OBgWubq1Z+ohxyxG/OkIvI6/4AALAcfAszoA Zj9Q3gBPACyujA8vRj1Sy0tFJShRwAyLneHXy8z/F2YoacLBQ+c8hz4CgaiVzmm/ X-Google-Smtp-Source: AGHT+IEEDwJ4vtUyveiQLpVJu7IhND0zd+2G0EykRP7VqAWulFWefyqwtP/Sd1TqXlul3M2kfXNrJw== X-Received: by 2002:a05:6402:4403:b0:5d0:d2ed:ebb with SMTP id 4fb4d7f45d1cf-5d81dd83a72mr92515440a12.3.1735588558983; Mon, 30 Dec 2024 11:55:58 -0800 (PST) Original-Received: from pro2 (p200300e0b7156f000dceccb84ca1ba38.dip0.t-ipconnect.de. [2003:e0:b715:6f00:dce:ccb8:4ca1:ba38]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0efe3958sm1492630066b.96.2024.12.30.11.55.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Dec 2024 11:55:58 -0800 (PST) In-Reply-To: <868qrxnfrw.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 30 Dec 2024 21:15:47 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x632.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:327467 Archived-At: Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: Helmut Eller , pipcet@protonmail.com, >> spd@toadstyle.org, emacs-devel@gnu.org >> Date: Mon, 30 Dec 2024 19:37:38 +0100 >>=20 >> So, to summarize, everyone agrees with Helmut?=20 > > That the SIGPROF handler in the form he described would be safe? I > agree. What we have in scratch/igc: static void handle_profiler_signal (int signal) { EMACS_INT count =3D 1; #if defined HAVE_ITIMERSPEC && defined HAVE_TIMER_GETOVERRUN if (profiler_timer_ok) { int overruns =3D timer_getoverrun (profiler_timer); eassert (overruns >=3D 0); count +=3D overruns; } #endif add_sample (&cpu, count); } static void add_sample (struct profiler_log *plog, EMACS_INT count) { #ifdef HAVE_MPS if (igc_busy_p ()) #else if (EQ (backtrace_top_function (), QAutomatic_GC)) /* bug#60237 */ #endif /* Special case the time-count inside GC because the hash-table code is not prepared to be used while the GC is running. More specifically it uses ASIZE at many places where it does not expect the ARRAY_MARK_FLAG to be set. We could try and harden the hash-table code, but it doesn't seem worth the effort. */ plog->gc_count =3D saturated_add (plog->gc_count, count); else record_backtrace (plog, count); } bool igc_busy_p (void) { return mps_arena_busy (global_igc->arena); } Now the question is if that's what Helmut was describing.