From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25229 invoked by alias); 5 Dec 2013 12:08: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 25218 invoked by uid 89); 5 Dec 2013 12:08:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_05,SPF_HELO_PASS,SPF_PASS autolearn=ham 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; Thu, 05 Dec 2013 12:07:58 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rB5C7nCL029316 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 5 Dec 2013 07:07:50 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rB5C01cq029392; Thu, 5 Dec 2013 07:00:02 -0500 Message-ID: <52A06AC1.1030209@redhat.com> Date: Thu, 05 Dec 2013 12:08: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: Yao Qi CC: Mark Kettenis , gdb-patches@sourceware.org Subject: Re: [PATCH 2/3] skip_prolgoue (amd64) References: <1385735051-27558-1-git-send-email-yao@codesourcery.com> <1385735051-27558-3-git-send-email-yao@codesourcery.com> <201311291436.rATEaZ5Z030292@glazunov.sibelius.xs4all.nl> <201311291605.rATG5XVb030184@glazunov.sibelius.xs4all.nl> <52994E79.4000004@codesourcery.com> <5299B9D0.2020304@redhat.com> <529C37A2.9000207@codesourcery.com> <529E9462.9010001@codesourcery.com> <529F1B1F.2040606@redhat.com> <529FD4B9.10008@codesourcery.com> In-Reply-To: <529FD4B9.10008@codesourcery.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-12/txt/msg00178.txt.bz2 On 12/05/2013 01:19 AM, Yao Qi wrote: > On 12/04/2013 08:07 PM, Pedro Alves wrote: >> It can still help for the duration of the command, or for the >> duration of the event handling. GDB might end up reading the >> same locations more than once while doing either. Also, the >> overfetching can still help anyway. E.g., in the prologue >> analyzers while handling each event. > > While handling an event, if another thread is still running, we still > can't use cache. I think we can. My view here is that handling an event is a quick and short lived operation. GDB bursts a few reads in sequence, and then moves on to the next event. In that scenario, you get as much stale results with or without a cache. IOW, even without the cache, running threads can change memory as GDB reads it, and so the chances of hitting stale data with or without a cache are practically the same. OTOH, distinct target events (and commands, etc.) can trigger quite apart (time-wise), and that break the odd balance -- not flushing the cache between events increases the changes of hitting stale data, compared to not having a cache. > Beside the predicate "is any thread running", another is "no thread is > resumed since last flushing". Cache should be flushed when either is > true. Not sure I understood that. -- Pedro Alves