From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: [RFC, experimental] save_{excursion,restriction} Date: Fri, 27 Jul 2012 11:51:24 +0800 Message-ID: <87sjcd3lqb.fsf@gnu.org> References: <500D84B6.50303@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1343361098 17119 80.91.229.3 (27 Jul 2012 03:51:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 27 Jul 2012 03:51:38 +0000 (UTC) Cc: Emacs development discussions To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 27 05:51:38 2012 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 1SubaT-0000Jd-2n for ged-emacs-devel@m.gmane.org; Fri, 27 Jul 2012 05:51:37 +0200 Original-Received: from localhost ([::1]:36771 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SubaS-0004U6-7O for ged-emacs-devel@m.gmane.org; Thu, 26 Jul 2012 23:51:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SubaP-0004Tx-Dr for emacs-devel@gnu.org; Thu, 26 Jul 2012 23:51:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SubaO-0003xZ-Dp for emacs-devel@gnu.org; Thu, 26 Jul 2012 23:51:33 -0400 Original-Received: from mail-pb0-f41.google.com ([209.85.160.41]:49718) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SubaO-0003xT-7X for emacs-devel@gnu.org; Thu, 26 Jul 2012 23:51:32 -0400 Original-Received: by pbbrp2 with SMTP id rp2so4744354pbb.0 for ; Thu, 26 Jul 2012 20:51:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=gdbXKIJjQcc7XT31Esv1dEU04vWcss3guVjkiImD79Y=; b=D/VTw5fXdqXxQxZifcztwMG8ZN3E69t6f649B24ndmLQEGddSpcDPYza6dQfJpS8UY HM9I8v58F14mVoeux4oZ03+NbRefmDtzpgbgpPxIaGJjAfJ+8MBY2ahgPtXF5nLSvI7T lhyIJIYsea83t20HOPTqihLjx8zsLJUpjiKT2naF1uQrff6U/gzKSPFbRr5niYDaS9Oo 185BDYTsFX5yo/yrRLcdqD5/2geLFmFo2RHBoYTaIKjfdBMmTEqgp2FhDleodEUCah/T dfujq/ADjY6JpJWI440WNLv8krz6q5wzRSdZ6DmXJJO8HN4h2ALKt0ybY+cPwCgW1suw sHxA== Original-Received: by 10.68.225.201 with SMTP id rm9mr10259993pbc.71.1343361090511; Thu, 26 Jul 2012 20:51:30 -0700 (PDT) Original-Received: from ulysses ([155.69.17.114]) by mx.google.com with ESMTPS id qp9sm1012224pbc.9.2012.07.26.20.51.26 (version=SSLv3 cipher=OTHER); Thu, 26 Jul 2012 20:51:28 -0700 (PDT) In-Reply-To: <500D84B6.50303@yandex.ru> (Dmitry Antipov's message of "Mon, 23 Jul 2012 21:07:02 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.41 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:151897 Archived-At: Dmitry Antipov writes: > It's worth trying to redesign save-restriction and save-excursion to avoid > allocating Lisp data. I tried some hacks for save-excursion, and it's quite > surprising: initially, running (while t (scroll-up) (sit-for 0.05)) over > just loaded xdisp.c with font-lock enabled asks for 600 GCs, and with this > patch it's just 350. With your revision 109221, emacs -Q M-x delete-trailing-whitespace RET M-x garbage-collect RET ----> Breakpoint 1, abort () at emacs.c:365 365 kill (getpid (), SIGABRT); (gdb) bt #0 abort () at emacs.c:365 #1 0x00000000005eb60b in mark_object (arg=26719011) at alloc.c:6167 #2 0x00000000005eb6da in mark_object (arg=19905638) at alloc.c:6185 #3 0x00000000005eb6da in mark_object (arg=19903334) at alloc.c:6185 #4 0x00000000005e92d8 in mark_maybe_object (obj=19903334) at alloc.c:4532 #5 0x00000000005e9637 in mark_memory (start=0x7fffffffc688, end=0x7fffffffdf78) at alloc.c:4695 Please fix this ASAP or revert (the crashes are frequent and annoying). Next time, I suggest running with such changes for a few days to weed out this kind of obvious problem.