From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3915 invoked by alias); 19 Nov 2013 11:52:13 -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 3906 invoked by uid 89); 19 Nov 2013 11:52:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_40,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 19 Nov 2013 11:52:12 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rAJBq3OI026677 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 19 Nov 2013 06:52:03 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rAJBq1JE005903; Tue, 19 Nov 2013 06:52:02 -0500 Message-ID: <528B50E1.4030505@redhat.com> Date: Tue, 19 Nov 2013 12:14:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Doug Evans CC: Yao Qi , gdb-patches Subject: Re: [PATCH 08/10] Don't invalidate dcache when option stack-cache is changed References: <1383458049-20893-1-git-send-email-yao@codesourcery.com> <1383458049-20893-9-git-send-email-yao@codesourcery.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-11/txt/msg00528.txt.bz2 I realize I didn't reply to this part, when I had meant to. On 11/17/2013 09:44 PM, Doug Evans wrote: > If one wanted to remove the cache invalidation for the off->on > transition that seems reasonable, but if I do a backtrace, turn the > caching optimization off, and then do another backtrace, I'd want the > second one to not use the cache. YMMV. I definitely agree. Actually, doesn't the patch actually introduce a bug, like: #1 - enable stack cache #2 - print stack variable #3 - disable cache #4 - write to variable. As the cache is off, and @@ -1593,14 +1593,14 @@ memory_xfer_partial_1 (struct target_ops *ops, enum target_object object, /* Make sure the cache gets updated no matter what - if we are writing to the stack. Even if this write is not tagged as such, we still need - to update the cache. */ + to update the cache. Update the cache to keep it in sync if it + has been initialized. */ if (res > 0 && inf != NULL && writebuf != NULL && target_dcache_init_p () && !region->attrib.cache - && stack_cache_enabled () && object != TARGET_OBJECT_STACK_MEMORY) { ... we don't update the cache. #5 - enable cache #6 - print variable again. The stale cached value is printed. ? -- Pedro Alves