From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16415 invoked by alias); 17 Nov 2013 19:34:01 -0000 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 Received: (qmail 16401 invoked by uid 89); 17 Nov 2013 19:34:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RDNS_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mail-ve0-f181.google.com Received: from Unknown (HELO mail-ve0-f181.google.com) (209.85.128.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 17 Nov 2013 19:33:59 +0000 Received: by mail-ve0-f181.google.com with SMTP id oy12so327250veb.12 for ; Sun, 17 Nov 2013 11:33:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=itFIHLEka7+OEAUH+9vTqu49OCL6h0Z0VXZ8pFFm24s=; b=gCaW7ZlfpNA4tlhtiwKcO4/lBXDWRbLnBsFJyhkTOo5eBamHEXdaFRREQoPfAW+n5I 9k6TgZDeszbbOQ/gLb0Ec+DpQaM4wvPswsP5Y74VjBvwubicI1dw+qubnEaV3QBE6Xkw 8gES9Kv0pTb83K2kXAhRpTuEA0hcdG5C0UGW6zakVhTswVbPAx1eREBSpzjpzjWvo8HO DZOw8JlEQsVFHfpthTg61vd+sI/+xEvTa487+IGF3GLQPOTgznTZn8nD4GHtPPU4FKVW bxLTKTT0sw5bS3s62y+yT6EfkFqEDxinoP99Yi2RwRyF6kmkn758gMrvFrtN+FZpUqmJ MIag== X-Gm-Message-State: ALoCoQkHX8vLjzpk2O18v5Ju9f9LTtQZHd8mnPzM8gJFCqAOKm2YOLtiGOsc/yrg/yzj9GmeyYQ5o9DG0pcb/AGdiXjwYbZkUdLjq7DJl87iVm95ToeLb7I3jx3R7EEm0fenJalzsl4GBwOIzBSUgZ3W87HeamHQLQMeyg+ewoh8NPBL4wuGdjb/rBlCua3jC8XK2act2VtAwkrO99emmOFJ/2TbzOYN/Q== MIME-Version: 1.0 X-Received: by 10.220.64.69 with SMTP id d5mr11795310vci.11.1384716831222; Sun, 17 Nov 2013 11:33:51 -0800 (PST) Received: by 10.52.163.52 with HTTP; Sun, 17 Nov 2013 11:33:51 -0800 (PST) In-Reply-To: <1383458049-20893-2-git-send-email-yao@codesourcery.com> References: <1383458049-20893-1-git-send-email-yao@codesourcery.com> <1383458049-20893-2-git-send-email-yao@codesourcery.com> Date: Sun, 17 Nov 2013 19:52:00 -0000 Message-ID: Subject: Re: [PATCH 01/10] Remove last_cache From: Doug Evans To: Yao Qi Cc: gdb-patches Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00445.txt.bz2 On Sat, Nov 2, 2013 at 10:54 PM, Yao Qi wrote: > This patch removes global variable 'last_cache', and initialize > 'target_dcache' lazily, so that 'target_dcache' can replace > 'last_cache'. No functionalities should be changed after this patch. > > gdb: > > 2013-11-02 Yao Qi > > * dcache.c (last_cache): Remove. > (dcache_free, dcache_init): Update. > (dcache_update): > (dcache_print_line): Add parameter 'dcache'. Replace > 'target_dcache' with 'dcache'. > (dcache_info): Move code to dcache_info_1. Call > 'dcache_info_1'. > (dcache_info_1): New function. > (set_dcache_size): Call target_dcache_invalidate. > (set_dcache_line_size): Call target_dcache_invalidate. > * target.c (target_dcache_init_p): New function. > (target_dcache_invalidate): Check target_dcache_init_p first. > (target_dcache_get, target_dcache_get_or_init): New function. > (memory_xfer_partial_1): Adjust. > (initialize_target): Don't initialize 'target_dcache'. > * target.h (struct dcache_struct): Declare. > (target_dcache_get): Declare. I haven't reviewed the rest of the patches in the series yet, but as a cleanup to remove last_cache, this patch is fine with me.