From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26017 invoked by alias); 31 Jan 2006 05:28:12 -0000 Received: (qmail 26009 invoked by uid 22791); 31 Jan 2006 05:28:12 -0000 X-Spam-Check-By: sourceware.org Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.198) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 31 Jan 2006 05:28:10 +0000 Received: by zproxy.gmail.com with SMTP id x3so1263629nzd for ; Mon, 30 Jan 2006 21:28:08 -0800 (PST) Received: by 10.36.148.13 with SMTP id v13mr5650793nzd; Mon, 30 Jan 2006 21:28:08 -0800 (PST) Received: by 10.37.2.63 with HTTP; Mon, 30 Jan 2006 21:28:06 -0800 (PST) Message-ID: <8f2776cb0601302128t347b161cg26e756501b93ebc1@mail.gmail.com> Date: Tue, 31 Jan 2006 05:28:00 -0000 From: Jim Blandy To: Eirik Fuller , gdb-patches@sourceware.org Subject: Re: [PATCH] Use mmap for symbol tables In-Reply-To: <20060131022330.GA24934@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20060129233630.3EFA6690067@ns.hackrat.org> <20060131022330.GA24934@nevyn.them.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00485.txt.bz2 On 1/30/06, Daniel Jacobowitz wrote: > One important note: you bypassed symfile_relocate_debug_section. > Instead, this logic ought to live in there; if the debug section > has relocations, we can't mmap it, because we do need to modify > everything we read from disk. > > There's some benefits other than the obvious to using read-only > mmap; you'll get better hot-cache performance because two consecutive > sessions can do DWARF processing on pages already read in, rather than > memcpy'ing them from the page cache. When debug sections have relocations, are they really covered with relocs, or are the relocs rare? I thought that MAP_PRIVATE was implemented using copy-on-write pages, so if the relocations are rare, then MAP_PRIVATE would give you a writeable image that still shared as much as possible.