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: Some experience with the igc branch Date: Tue, 24 Dec 2024 13:56:18 +0100 Message-ID: References: <87o713wwsi.fsf@telefonica.net> <87ldw7fwet.fsf@protonmail.com> <87a5cnfj8t.fsf@protonmail.com> <86seqe4j4f.fsf@gnu.org> <87ttaucub8.fsf@protonmail.com> <87pllicrpi.fsf@protonmail.com> <864j2u442i.fsf@gnu.org> <87ldw6as5f.fsf@protonmail.com> <86o7112rnq.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="30542"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: pipcet@protonmail.com, ofv@wanadoo.es, emacs-devel@gnu.org, eller.helmut@gmail.com, acorallo@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 24 13:56:50 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 1tQ4Su-0007kM-6W for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Dec 2024 13:56:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQ4SZ-0004OI-Gf; Tue, 24 Dec 2024 07:56:27 -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 1tQ4SY-0004O3-BM for emacs-devel@gnu.org; Tue, 24 Dec 2024 07:56:26 -0500 Original-Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tQ4SW-0001OV-P8; Tue, 24 Dec 2024 07:56:26 -0500 Original-Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5d437235769so2402855a12.2; Tue, 24 Dec 2024 04:56:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735044982; x=1735649782; 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=YHTA2fyWbU9wBLo3i5KVmFMq4Yiep1uSZjRgnwJuFvk=; b=EvLzXOtWunksbI5A0FJt7lHvin8HmHIvYMkVr2pkffzZn/M1cN1XmyRt+URTlReUhq tU48DnYtLy9MtHaEMaQGOuOR6nIYP0YeAFYqgPkG9PSw7kRgtHgQuT6NN+KFBHzimufo IboFNXa8LEkdExgy+5zCGyi+UVcCGLtB1L2XXK5K+MqrsDcBzqjqZ3o7a9JPdaq2M6Jj ktea5A7PaUgsdy0Kdg9yhlHppwcbSZW/mpxybRTPsvPT0DezChf4T6p9Oa4RZ5wCwvXk i8u9W/qE0pwUQsFacaKRcQ9pfZiuOBVXEx5tAxbJyhS2yqMTRlUasTgIExlxMot6vd8a Jouw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735044982; x=1735649782; 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=YHTA2fyWbU9wBLo3i5KVmFMq4Yiep1uSZjRgnwJuFvk=; b=GBNLqlH0OhExRZE57xAkIT/zhFXvVpbPyELgruDthT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wySqvGLgwYVcI1FYZImFCYfg== X-Received: by 2002:a05:6402:2809:b0:5d1:2377:5b07 with SMTP id 4fb4d7f45d1cf-5d81dd4ef8emr14543126a12.6.1735044981695; Tue, 24 Dec 2024 04:56:21 -0800 (PST) Original-Received: from pro2 (p200300e0b7326d00f9ed2197837c3ebd.dip0.t-ipconnect.de. [2003:e0:b732:6d00:f9ed:2197:837c:3ebd]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d80675a47csm6165475a12.17.2024.12.24.04.56.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Dec 2024 04:56:20 -0800 (PST) In-Reply-To: <86o7112rnq.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 24 Dec 2024 14:26:33 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x530.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:327001 Archived-At: Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: Eli Zaretskii , ofv@wanadoo.es, emacs-devel@gnu.org, >> eller.helmut@gmail.com, acorallo@gnu.org >> Date: Tue, 24 Dec 2024 05:03:36 +0100 >>=20 >> I'd prefer to send messages from handle_profiler_signal. Or something >> equivalent to sending messages. > > How would that be different? If the messages arrive asynchronously > and are handled asynchronously, that's the moral equivalent of > signals, no?=20 I'm using SIGPROF below to make it more concrete. Similar for other signals. The idea is to get the backtrace in the SIGPROF handler, without accessing Lisp data. That can be done, as I've tried to show. Then place that backtrace somewhere. In an an actor model architecture, one would use a message that contains the backtrace and post it to a message board. I used that architecture just as an example, because I like it a lot. In the same architecture, typically a scheduler thread would then assign a thread to handle the message. The handler handling the profiler message would then do what record_backtrace today does after get_backtrace, i.e. count same backtraces.=20 That's only one example architectures, of course. One can use something else, like queues that are handled by another thread, one doesn't need a scheduler thread, and so on, and so on. Pip's work queue is an example.