From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: GC and stack marking Date: Wed, 21 May 2014 19:53:30 +0300 Message-ID: <834n0jnkdx.fsf@gnu.org> References: <83a9add91p.fsf@gnu.org> <8338g4bd7m.fsf@gnu.org> <83wqdgntan.fsf@gnu.org> <83ppj7oniv.fsf@gnu.org> <838upvnnsq.fsf@gnu.org> <537CCCF6.6020509@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1400691231 16255 80.91.229.3 (21 May 2014 16:53:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 May 2014 16:53:51 +0000 (UTC) Cc: fabrice.popineau@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 21 18:53:40 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wn9lm-0007yo-7H for ged-emacs-devel@m.gmane.org; Wed, 21 May 2014 18:53:34 +0200 Original-Received: from localhost ([::1]:60979 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wn9ll-0005pQ-Ri for ged-emacs-devel@m.gmane.org; Wed, 21 May 2014 12:53:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wn9le-0005oi-O4 for emacs-devel@gnu.org; Wed, 21 May 2014 12:53:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wn9lZ-0002qz-T9 for emacs-devel@gnu.org; Wed, 21 May 2014 12:53:26 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:35000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wn9lZ-0002qs-Kg for emacs-devel@gnu.org; Wed, 21 May 2014 12:53:21 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0N5X00J00O4K8T00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Wed, 21 May 2014 19:53:20 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N5X00JCHO8V33B0@a-mtaout23.012.net.il>; Wed, 21 May 2014 19:53:20 +0300 (IDT) In-reply-to: <537CCCF6.6020509@yandex.ru> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:171996 Archived-At: > Date: Wed, 21 May 2014 19:57:42 +0400 > From: Dmitry Antipov > CC: Stefan Monnier , > fabrice.popineau@gmail.com, emacs-devel@gnu.org > > On 05/21/2014 07:39 PM, Eli Zaretskii wrote: > > > Now, I have a question: mark_stack stops examining the stack when it > > gets to its own stack frame. That is certainly safe, but it sounds > > too conservative: it should stop at the stack frame of > > Fgarbage_collect, I think, because no live Lisp object can appear > > while Fgarbage_collect runs, right? > > 1) Yes, but you need ABI- and machine-specific tricks to find the stack frame boundaries. I.e. > while in mark_stack, there is no easy way to find start and end of Fgarbage_collect's stack frame. I thought of passing that to mark_stack as argument when Fgarbage_collect calls it. That should work as well as what we do in mark_stack to find its own stack frame, no? > 3) But even if 2) works on all platforms we have to support, I don't see a reasons to complicate > GC just to avoid scanning a few tens of bytes of an extra stack frame. The issue discussed in this thread _is_ that reason: we are dumping Emacs with a dead object, for no good reason, and that object is quite large (around 1MB).