From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: MPS: User GC customizations Date: Thu, 04 Jul 2024 20:53:10 +0300 Message-ID: <86a5ix82nt.fsf@gnu.org> References: <87v81pbgzi.fsf@localhost> <87y16khvhy.fsf@localhost> <87frspqwhr.fsf@localhost> <87tth5pdqc.fsf@localhost> <87le2h47kj.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24251"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pipcet@protonmail.com, yantar92@posteo.net, emacs-devel@gnu.org, eller.helmut@gmail.com To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jul 04 19:54:06 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 1sPQej-00063L-3i for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Jul 2024 19:54:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPQe7-0007xj-AU; Thu, 04 Jul 2024 13:53:27 -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 1sPQe4-0007xU-WE for emacs-devel@gnu.org; Thu, 04 Jul 2024 13:53:25 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sPQe3-0004Ra-UU; Thu, 04 Jul 2024 13:53:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=jPknkeWuS9woJoUrOhYFkk0Gko4VRtzX+UascLMAsy0=; b=RfSfqw+yVeOyl0CmZGvP lCm1MM8WPIvnv4jtFBVi1JtQ8UhXVUZBRVfzODSNMYCSuL5JUi1p+r43HEomdB9/U4Kgry6nJzB68 HlngTahmPkaTS8/fsk7iDb4Rpt284Ujs1xbGmLbWzVDCMrY6oWsBI1k1LN2DjBrRL0mJ9a9D5rYfb Wd0PFkgkv2El8yRpbNKonpgloLuh6NkxAGsTrVBkI0USJhymRfZgkWLbPDAmKCQm2d3jajTxoOVbx jwgcE5+UNNJe0kku7FU9WU/4zPRgzyLso+QuqCxZhIZm0ZMEdYX6601s7H/s99zQrLzBidPPsEUPy FOCHXENzHgRibA==; In-Reply-To: (message from Gerd =?utf-8?Q?M=C3=B6llmann?= on Thu, 04 Jul 2024 18:07:42 +0200) 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:321347 Archived-At: > From: Gerd Möllmann > Cc: Ihor Radchenko , Eli Zaretskii , > emacs-devel@gnu.org, eller.helmut@gmail.com > Date: Thu, 04 Jul 2024 18:07:42 +0200 > > Pip Cet writes: > > > 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? > > 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, > Darwin is a kind of Mach descendant, and as such it uses Mach exceptions > for hardware faults. Among those is EXC_BAD_ACCESS which one gets for > protection faults. Exceptions are handled by installing a "port" > which runs in its own thread and which the OS invokes when the exception > occurs. > > Exception handling is "synchronous", which I think means the OS suspends > the thread which caused the exception, invokes the port for doing what > it wants, and when done let's the original thread continue, if the port > wants that. That's very similar to what happens on Windows, at least on this high level of description.