From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7861 invoked by alias); 24 Mar 2004 20:25:36 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 7849 invoked from network); 24 Mar 2004 20:25:34 -0000 Received: from unknown (HELO mailhost.calypto.com) (66.17.65.87) by sources.redhat.com with SMTP; 24 Mar 2004 20:25:34 -0000 Received: from rio (rio.calypto.com [192.168.100.120]) by mailhost.calypto.com (8.11.6/8.11.6) with ESMTP id i2OKPYv20767 for ; Wed, 24 Mar 2004 12:25:34 -0800 From: Nick Savoiu To: gdb@sources.redhat.com Subject: Re: Caching of object/libraries/files Date: Wed, 24 Mar 2004 23:11:00 -0000 User-Agent: KMail/1.6.1 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200403241225.11564.savoiu@ics.uci.edu> X-SW-Source: 2004-03/txt/msg00241.txt.bz2 The problem that I have is that after I run gdb once, exit it then start it right after it seems to reload all the debug info from disk. I was expecting a good deal of them to be loaded from the OS file cache -> much less disk activity the second time around. Nick > On Thu, Mar 18, 2004 at 10:46:47AM -0800, Nick Savoiu wrote: > > Hi all, > > > > I have a rather large project composed of a small driver executable and > > quite a few .so libraries that it uses. > > > > When I invoke it with GDB, upon executing 'run' it takes quite a while for > > GDB to do it's thing (i.e. load symbols, whatever else it does) particularly > > since it does a lot of disk access. > > > > I was thinking that, if I start a GDB session on this project, run it for a > > while then quit and immediately restart a similar session, then most of the > > files would be cached. However, I see the same amount of disk access for the > > second session when 'run' is invoked as for the first. > > > > Any ideas why this is so? The GDB session itself uses about 340MB and I have > > 1GB RAM. > > This is something that I've been meaning to fix for a long, long time. > We unload all shared objects when the program exits; what we ought to > do is move them to a separate cache structure.