From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13272 invoked by alias); 20 Aug 2009 22:51:56 -0000 Received: (qmail 13261 invoked by uid 22791); 20 Aug 2009 22:51:55 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 Aug 2009 22:51:49 +0000 Received: from zps18.corp.google.com (zps18.corp.google.com [172.25.146.18]) by smtp-out.google.com with ESMTP id n7KMpjuQ030029 for ; Thu, 20 Aug 2009 23:51:46 +0100 Received: from ywh34 (ywh34.prod.google.com [10.192.8.34]) by zps18.corp.google.com with ESMTP id n7KMpW0U028152 for ; Thu, 20 Aug 2009 15:51:43 -0700 Received: by ywh34 with SMTP id 34so349702ywh.6 for ; Thu, 20 Aug 2009 15:51:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.116.19 with SMTP id o19mr815448ybc.110.1250808702694; Thu, 20 Aug 2009 15:51:42 -0700 (PDT) In-Reply-To: References: <7e6c8d660907071424j7e96ffb3r5b129ba97040d7e1@mail.gmail.com> Date: Fri, 21 Aug 2009 03:04:00 -0000 Message-ID: Subject: Re: [RFA] Rewrite data cache to use splay tree From: Doug Evans To: Jacob Potter Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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-08/txt/msg00332.txt.bz2 On Thu, Aug 20, 2009 at 3:33 PM, Doug Evans wrote: > Hi. > > I checked in a sligntly modified version of this patch. > The actual stack caching patch is still todo. > > 2009-08-20 =A0Jacob Potter =A0 > > =A0 =A0 =A0 =A0Replace dcache with splay tree. > =A0 =A0 =A0 =A0Remove partially implemented writeback support. > =A0 =A0 =A0 =A0* dcache.c: Include splay-tree.h. > =A0 =A0 =A0 =A0(LINE_SIZE_POWER): Change from 5 to 6. > =A0 =A0 =A0 =A0(DCACHE_SIZE): Change from 64 to 4096. > =A0 =A0 =A0 =A0(ENTRY_INVALID, ENTRY_VALID, ENTRY_DIRTY): Delete. > =A0 =A0 =A0 =A0(state_chars): Delete. > =A0 =A0 =A0 =A0(struct dcache_block): Clean up; remove state and anydirty= fields. > =A0 =A0 =A0 =A0(struct dcache_struct): Redefine as a splay tree and linke= d list. > =A0 =A0 =A0 =A0(last_cache): Make static. > =A0 =A0 =A0 =A0(dcache_invalidate, dcache_hit): Rewrite for new cache str= ucture. > =A0 =A0 =A0 =A0(dcache_read_line, dcache_alloc): Rewrite for new cache st= ructure. > =A0 =A0 =A0 =A0(dcache_write_line): Delete. > =A0 =A0 =A0 =A0(dcache_writeback): Delete. > =A0 =A0 =A0 =A0(dcache_peek_byte): Clean up; remove "invalid" state check. > =A0 =A0 =A0 =A0(dcache_poke_byte): Rewrite for new cache structure; clari= fy comment. > =A0 =A0 =A0 =A0(dcache_splay_tree_compare): New function. > =A0 =A0 =A0 =A0(dcache_init, dcache_free): Rewrite for new cache structur= e. > =A0 =A0 =A0 =A0(dcache_xfer_memory): Rewrite for new write-through cache = structure. > =A0 =A0 =A0 =A0(dcache_print_line): New function. > =A0 =A0 =A0 =A0(dcache_info): Rewrite for new cache structure. > =A0 =A0 =A0 =A0(_initialize_dcache): Update "info dcache" help text. > =A0 =A0 =A0 =A0* dcache.h (dcache_xfer_memory): Update declaration. > =A0 =A0 =A0 =A0* target.c (memory_xfer_partial): Update calls to dcache_x= fer_memory. > Blech. There's one more bit of cleanup that needed to be done. It was on my mental list, and then got dropped. One can't use %lx to print CORE_ADDRs. Fixing pronto.