From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: GC and stack marking Date: Thu, 22 May 2014 07:37:27 +0200 Organization: Organization?!? Message-ID: <87vbsy8jc8.fsf@fencepost.gnu.org> References: <83sio2nb4s.fsf@gnu.org> <83r43mmt25.fsf@gnu.org> <537D6B2D.90208@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1400737086 7615 80.91.229.3 (22 May 2014 05:38:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 May 2014 05:38:06 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 22 07:37:56 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 1WnLhU-0004u3-3r for ged-emacs-devel@m.gmane.org; Thu, 22 May 2014 07:37:56 +0200 Original-Received: from localhost ([::1]:34850 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnLhT-00082N-Me for ged-emacs-devel@m.gmane.org; Thu, 22 May 2014 01:37:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnLhL-000822-4n for emacs-devel@gnu.org; Thu, 22 May 2014 01:37:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnLhF-0008Il-NJ for emacs-devel@gnu.org; Thu, 22 May 2014 01:37:47 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:33385) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnLhF-0008IO-G0 for emacs-devel@gnu.org; Thu, 22 May 2014 01:37:41 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WnLhD-0004Sc-6C for emacs-devel@gnu.org; Thu, 22 May 2014 07:37:39 +0200 Original-Received: from x2f3ec0d.dyn.telefonica.de ([2.243.236.13]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 May 2014 07:37:39 +0200 Original-Received: from dak by x2f3ec0d.dyn.telefonica.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 May 2014 07:37:39 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 34 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: x2f3ec0d.dyn.telefonica.de X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) Cancel-Lock: sha1:a+5uET67cZlzqEO/mJaX3Ry76i8= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:172015 Archived-At: Daniel Colascione writes: > On 05/21/2014 07:43 PM, Eli Zaretskii wrote: >>> Date: Wed, 21 May 2014 16:49:22 -0400 >>> From: Barry OReilly >>> Cc: emacs-devel@gnu.org >>> >>> Even if we're only talking about the stack variables in the frames that are >>> active during your particular problematic case (and perhaps in the idle >>> Emacs GC case)? >> >> I thought you were asking about having the compiler generate the code >> to do that, which would then happen everywhere. >> >> If you propose doing that selectively, I don't know how this would be >> possible, since on the C level you don't have a way of telling how >> much stack is allocated in a given function. >> >>> Have you already ruled out whether stack_top_variable contributes one of >>> the bytes in your false positive lookup in the mem_node tree? >> >> Yes. I looked at all the local variables in that stack frame, and >> their addresses on the stack are different from the one that triggers >> the problem. > > What about cleaning the stack (memset from the top to the high water > mark) every once in a while? How about explicitly triggering garbage collection at a point of time where the water mark is really low? For the few remaining variables, initializing them explicitly would then not be a high cost. -- David Kastrup