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 14:38:15 +0100 Message-ID: References: <87o713wwsi.fsf@telefonica.net> <87pllicrpi.fsf@protonmail.com> <864j2u442i.fsf@gnu.org> <87ldw6as5f.fsf@protonmail.com> <86o7112rnq.fsf@gnu.org> <8734idb4nj.fsf@protonmail.com> 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="33867"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , ofv@wanadoo.es, emacs-devel@gnu.org, eller.helmut@gmail.com, acorallo@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 24 14:39:08 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 1tQ57s-0008fF-9M for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Dec 2024 14:39:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQ57C-00005k-8m; Tue, 24 Dec 2024 08:38:26 -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 1tQ57A-00005V-Fr for emacs-devel@gnu.org; Tue, 24 Dec 2024 08:38:24 -0500 Original-Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tQ577-0007qz-8x; Tue, 24 Dec 2024 08:38:23 -0500 Original-Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-aabfb33aff8so909045666b.0; Tue, 24 Dec 2024 05:38:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735047497; x=1735652297; 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=ly2UoYvSYOUTq3LzlSNuphjHiqgIg4lEfa+wiK9Ofz0=; b=BFyUx45CKDGi57QoDIrFg4MidT5vwMRA+fMQmwQCkG770RCZ/D7wK5OIwSyJ86urba mQILQ/TsGvPfcqMolEhCP/SsFKphC5Wt+z2+wRoOPKGOqOyVJL+p0p+GMHqH5a83uPNT L4/qQSGwVN1k10vMfojDAYS4+bDzO0yBMoDSiCQeJ88oJKQQMbJpatA5JHW1UBY49pWW YTppDagh1r1xj8QuG+NR3FRGkRqlO2HNxENcwbBW/sVuW2W5U5wbZZl3NmGXkV2jJ+Kd HYBSK153fmZEGagt3GXdsfyYtP+wGPY+GUT71igVDVHXW9l5H/vbk1wGVODzI/c8qpXD l3gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735047497; x=1735652297; 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=ly2UoYvSYOUTq3LzlSNuphjHiqgIg4lEfa+wiK9Ofz0=; b=f+U5mC2FcJT6p5pXaqLE6K0cl3+DZ2UOphU6i4AZVMdXZUCus12EN04ip++avxC8hx xPV4p/MkQZz3w2n6xh9UUUvfr6LYx06+dhepmkEWVVFSBvARfvaHpspnWiUsaEWEREtt iUf3uq78IGBp4CXlDxcitPBYE4H/VU7K///ntTo5GBymofK3vo+srLqRfbypWX6LU6/v J30d1aAsMu8l3v30C1yp5kxDyNP07odaNGaAHHCyYtJAAUI3G7sUSu1l1aY+ag8nB+kL PFH8+NAi7FieHVPK9yN+GmIREidG8a5K2YllQ4UIkrHCPx0ZJTUbz8Blbdg0Qf/a5iI9 O9eg== X-Forwarded-Encrypted: i=1; AJvYcCVZdvixM648/PEY0r+W/8o2tqzapwYZRG/LyoC6YgRgRFNgDlvf6eXqNQteOxHponENvqHIB+VmeENTCus=@gnu.org, AJvYcCXrC/BRzLlgP7gaAdsNeGWmgwcA7v7Rzo6Dy84mmTYi1g+uVsxwlDtFCaqwmfi+W5FAcHtCXDiSKA==@gnu.org X-Gm-Message-State: AOJu0YzUnIgoUybSvFziCFKdsiFUqiUWV6boRAq/7SYS/MJ9hdCTJOY6 YcUFuEFGngB59ySMh0flfQuIlrDpwTlfkxdzb3iZiu0PeTGZdBkZH4HUyQ== X-Gm-Gg: ASbGnctpz54PDW1fWAwr2vmenwzBklOZhQbLmA9vHHGHa0hmChG4wnisqK4b9FHju6o 3+FGHKdF/cArJI+7x2lRZnNsoeRvFa32yvA/Or8zzr1t/Rurk3klmeDIeg7fDAEQf63kHml5CDG FOnbbciBT3eMAJUXmaaPfJNtm4WKTFR+BHTPxZDWl+6ZmMLeT1+qvE+17SmvxbGDrTlnAbT5IGe GgrxqgJrR933HoJcrSLXiYfC4lfIY9p+/BNsmrCxxGSyHZdf/poCzn0Z0XDGI+/O7OEwWmhtGKX 57RoVBL/TT8tNxQdezgygJY6/gjGtbBaImxuO05MOT88q7R0BD46bHUHs5w3gpW6qg== X-Google-Smtp-Source: AGHT+IHzDNWhipRGNigkHKfbNZfibsHCJpppoeAKCshYbdPZZ2p++Q+PU52p+EQQ+k0wio9CxBwCLQ== X-Received: by 2002:a17:907:9615:b0:a9a:6c41:50a8 with SMTP id a640c23a62f3a-aac08155183mr1785588066b.17.1735047496662; Tue, 24 Dec 2024 05:38:16 -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 a640c23a62f3a-aac0f013938sm653197066b.139.2024.12.24.05.38.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Dec 2024 05:38:16 -0800 (PST) In-Reply-To: <8734idb4nj.fsf@protonmail.com> (Pip Cet's message of "Tue, 24 Dec 2024 13:19:26 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x630.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:327009 Archived-At: Pip Cet writes: > Gerd M=C3=B6llmann writes: > >> 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. > > I don't understand. We need to access the specpdl, which I consider > Lisp data, and certainly the backtrace includes data which can only be > generated using MPS-managed memory. What I meant with it not being Lisp data is union specbinding. The stack of bindings is a root, and doesn't have a barrier. And accessing the stack is not a problem because PVEC_THREAD is allocated from AMS which doesn't have barriers. What we collect in get_backtrace is an array of Lisp_Objects for the functions, and that's okay. > >> Then place that backtrace somewhere. > > I still think it's better to copy the specpdl, since that allows us to > generate the "backtrace" (whatever we choose to use for that) in Lisp. > If we spend too much time allocating short-lived data which triggers too > many GCs, we want to know what to fix in the Lisp code. In a way, what get_backtrace does is copy part of the bindings stack, only the functions. The resulting backtrace that the user sees could be done in Lisp, maybe, don't know. Important part for me is that we get out of the signal handler to do stuff. > Honestly, though, it doesn't matter much, does it? Right, it's all details. > >> 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. > > That's Helmut's code, not mine. +2=F0=9F=91=8D to Helmut, -=F0=9F=91=8D to Pip, -=F0=9F=91=8D to me :-)