From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.devel Subject: Re: NS port: How to debug excessive garbage collection? Date: Mon, 15 Apr 2019 22:51:46 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="86786"; mail-complaints-to="usenet@blaine.gmane.org" Cc: eliz@gnu.org, emacs-devel@gnu.org To: Alex Gramiak Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 16 07:52:33 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hGH1D-000MOR-P4 for ged-emacs-devel@m.gmane.org; Tue, 16 Apr 2019 07:52:32 +0200 Original-Received: from localhost ([127.0.0.1]:59777 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hGH1C-0003bd-K6 for ged-emacs-devel@m.gmane.org; Tue, 16 Apr 2019 01:52:30 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hGH0X-0003bY-O9 for emacs-devel@gnu.org; Tue, 16 Apr 2019 01:51:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hGH0W-0003UL-RP for emacs-devel@gnu.org; Tue, 16 Apr 2019 01:51:49 -0400 Original-Received: from gateway36.websitewelcome.com ([192.185.179.26]:40748) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hGH0W-0003U6-E4 for emacs-devel@gnu.org; Tue, 16 Apr 2019 01:51:48 -0400 Original-Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway36.websitewelcome.com (Postfix) with ESMTP id E8F97404645C1 for ; Tue, 16 Apr 2019 00:09:39 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id GH0Vh2o96YTGMGH0VhAQ6F; Tue, 16 Apr 2019 00:51:47 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date: Sender:Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=/01bXcJQHNaSwRD4/DbBcFuhL2qhQsWweDI46wbh4gU=; b=AlKpNAOAzIvjYwfNoGsRKFSs00 SwfTMA/MzUuBvbB+tz370Vq1h8tUPs2G2l6lC+xiThdguj+HzJBvjJYrcEYmIbct8VZTmgJvTEg+h O8GwWuD9knXconN92XUl+PWBaIKfEbaGLRedmiNdNp24JdQW74ZBi6Waw/w0nPDC9KYNT669f4uPI hDMkYHLnYIwTnmd9J+nGxcsgIIgFUrIO0g8xabbrjVWZjLVYRkLU5hGTG0GoKx+XHGCYeWj98Re1r 8TILx1RKDQdMx5a/rHgGX9nY7xEYn0yO5gN7elUGVupbH8sQpC7sfX3hr3xlc54b9HiWWMvsnmUK6 rqg0uLmg==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:58339 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.91) (envelope-from ) id 1hGH0U-0005O3-NT; Tue, 16 Apr 2019 00:51:46 -0500 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.239.195 X-Source-L: No X-Exim-ID: 1hGH0U-0005O3-NT X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.local) [45.48.239.195]:58339 X-Source-Auth: lawlist X-Email-Count: 1 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 192.185.179.26 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:235508 Archived-At: Thank you, Alex, for pinpointing my error in the call to memset. Greatly appreciated! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > Date: [04-15-2019 22:26:05] <15 Apr 2019 23:26:05 -0600> > From: Alex Gramiak > To: Keith David Bershatsky > Cc: eliz@gnu.org, emacs-devel@gnu.org > Subject: Re: NS port: How to debug excessive garbage collection? > > * * * > > The problem here is that since you changed the single struct cache to an > array of caches, you need to also change the memset call to match it. > Right now you are setting the pointer variable to 0/NULL. It should now > be: > > memset (w->mc_elts, 0, w->mc_nelts * (sizeof *w->mc_elts)); > > Which sets the memory block of mc_nelts cache structs pointed to > by mc_elts to 0.