From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2595 invoked by alias); 4 Dec 2013 17:54:43 -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 2583 invoked by uid 89); 4 Dec 2013 17:54:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_50,RDNS_NONE,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-ve0-f175.google.com Received: from Unknown (HELO mail-ve0-f175.google.com) (209.85.128.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 04 Dec 2013 17:54:42 +0000 Received: by mail-ve0-f175.google.com with SMTP id jx11so12282259veb.20 for ; Wed, 04 Dec 2013 09:54:34 -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=ib/gC/8TSZFYNbo8KIh2YTKLIfCV9J1O9dNfPjVYrHM=; b=NzAGCOJXjWVS0ladH2mi9v2SC7hcpLlPC4CGZk1alplZaCooOTTtHj/4EIx5lXmcGY Iy+dca1QBzKEalXwQCSzMqIRGzoWeGMrShJSjEET1siT1NxB7Ey0Ao6aRd6qkOUaBpMy NfvfK/RXQg0H1dGl+oDKgS32opIpONRZj21pmv1S3YFy2uM6AhRN/oQZ5SnBIpTHuVct BAH5ii0LdzY21iBpBcq2uVHck6Tc8P3Z3nwzE2dQh0YIcrSP5meLzvjT4cjTXexg/lI+ ghlKnAysojsEXNtH8G5wXNNQ99skTIq6+yd5efaVtFx4d1+Fr4nNWP4kXoDHilccycag 1spg== X-Gm-Message-State: ALoCoQmokxXOLB4/lzFbAm1AG8VlHGjdyNUZbyLLZzeWVRJGv6jDmP6dSeKB4M3fQrlTTtnJfEvnp5LGl8t+F1xJlrEJfcm8l+XUCaWuiXPnf/EEXdoVH7kQ/qe6haPPfshXGM0T8U/IaSvfbQYjeBMAfP5y+CSdifqDGd6dRuTqB7hMECXndPQDBqH1drhf/LgONtocbg6iMYtvx8mf/kaIVRn2ae/yIA== MIME-Version: 1.0 X-Received: by 10.58.232.228 with SMTP id tr4mr1431581vec.34.1386179674062; Wed, 04 Dec 2013 09:54:34 -0800 (PST) Received: by 10.52.163.52 with HTTP; Wed, 4 Dec 2013 09:54:33 -0800 (PST) In-Reply-To: <5299B9D0.2020304@redhat.com> 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> Date: Wed, 04 Dec 2013 17:54:00 -0000 Message-ID: Subject: Re: [PATCH 2/3] skip_prolgoue (amd64) From: Doug Evans To: Pedro Alves Cc: Yao Qi , Mark Kettenis , gdb-patches Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00158.txt.bz2 On Sat, Nov 30, 2013 at 2:11 AM, Pedro Alves wrote: > It seems like we can "dangerously" hit stale cache (probably most > visible with non-stop mode) between target events: > > #1 - all threads set running, dcache is invalidated > > #2 - thread 1 stops. As we handle the event, we read code, and cache it. > > #3 - others threads continue running. some thread jits something, or > changes code that was cached. > > #4 - thread 2 stops. As we handle the event, we read code, hitting > stale cache. > > > I'm thinking we might need to flush the dcache before handling each > event, like we already invalidate the overlay cache (see > "overlay_cache_invalid = 1" in infrun.c) ? Hi. Still catching up on this thread. The dcache and non-stop are basically incompatible, but we need both. With any other thread still running the ground can be pulled out from underneath my view of memory from a stopped thread (even when I'm in the middle of viewing it - I can imagine a pretty-printer of a complex object getting really confused for example). It feels like there's diminishing returns and increasing costs the farther we go to try to protect the user from this.