From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31652 invoked by alias); 30 Jun 2009 21:28:00 -0000 Received: (qmail 31636 invoked by uid 22791); 30 Jun 2009 21:28:00 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 30 Jun 2009 21:27:54 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id B49DE108CC; Tue, 30 Jun 2009 21:27:51 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 4936510597; Tue, 30 Jun 2009 21:27:51 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1MLkrl-0008RM-4L; Tue, 30 Jun 2009 17:27:49 -0400 Date: Tue, 30 Jun 2009 21:28:00 -0000 From: Daniel Jacobowitz To: Jacob Potter Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Rewrite data cache and use for stack access. Message-ID: <20090630212749.GA31857@caradoc.them.org> Mail-Followup-To: Jacob Potter , gdb-patches@sourceware.org References: <7e6c8d660906291200r164b3c7l95376866122e86fb@mail.gmail.com> <20090629193230.GA8840@caradoc.them.org> <7e6c8d660906301416k6fac6853k1d295bd5feae3283@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7e6c8d660906301416k6fac6853k1d295bd5feae3283@mail.gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00899.txt.bz2 On Tue, Jun 30, 2009 at 02:16:09PM -0700, Jacob Potter wrote: > > * I'd find it helpful if any performance improvements were separated > > out from stack caching. Could you do that? > > > > I've split it into two patch files. Should I be submitting them as > completely separate [RFA]s? Yes, please - this just simplifies review. > > * Have you thought at all about non-stop or multi-process debugging? > > If we have a data cache which is specifically for stack accesses, > > maybe we should associate it with the thread. > > I don't think we need to associate the cache with a particular thread, > since the threads' stacks will be in separate parts of the address > space anyway; multiple caches will just add more stuff to keep track > of. You're right - but multi-process is another story; a memory address requires a process context. > For non-stop debugging, it seems like the correct thing to do would be > to clear the cache between each _command_ the user gives. It's > conceivable that a running thread might modify a value on a stopped > thread's stack, and we don't want to hide that by keeping the cache > between two backtrace commands. This may already happen; I'll double > check. Is this really necessary? It defeats a lot of the benefit of the caching, I'd think. > > * We'd prefer that new functions take a target_ops; are the > > current_target versions of read_stack and target_stack necessary? > > They're called from value_at, which doesn't seem to get information > about the target; is there a way to avoid using current_target there? There probably isn't. Let's push the use of current_target up into the call site, instead of creating more 'bad' callees. -- Daniel Jacobowitz CodeSourcery