From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9751 invoked by alias); 31 Jan 2006 02:23:36 -0000 Received: (qmail 9741 invoked by uid 22791); 31 Jan 2006 02:23:36 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 31 Jan 2006 02:23:32 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1F3lB4-0006XA-Ja; Mon, 30 Jan 2006 21:23:30 -0500 Date: Tue, 31 Jan 2006 02:23:00 -0000 From: Daniel Jacobowitz To: Eirik Fuller Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Use mmap for symbol tables Message-ID: <20060131022330.GA24934@nevyn.them.org> Mail-Followup-To: Eirik Fuller , gdb-patches@sourceware.org References: <20060129233630.3EFA6690067@ns.hackrat.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060129233630.3EFA6690067@ns.hackrat.org> User-Agent: Mutt/1.5.8i 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/msg00478.txt.bz2 Not a whole lot to add in addition to what others have already said. 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. I've got no qualms about mmapping the whole object. We already are likely to run into address space issues if the file is large enough for this to matter. I'm not real sympathetic to tools which edit debugged binaries in place; and any standard build tools will unlink the old file. We can do the same thing on Windows and if there's a use for it on Unix systems someone should investigate whether an equivalent hack helps on native Windows. -- Daniel Jacobowitz CodeSourcery