This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/3] skip_prolgoue (amd64)
- From: Doug Evans <dje at google dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Yao Qi <yao at codesourcery dot com>, Mark Kettenis <mark dot kettenis at xs4all dot nl>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Wed, 4 Dec 2013 09:54:33 -0800
- Subject: Re: [PATCH 2/3] skip_prolgoue (amd64)
- Authentication-results: sourceware.org; auth=none
- References: <1385735051-27558-1-git-send-email-yao at codesourcery dot com> <1385735051-27558-3-git-send-email-yao at codesourcery dot com> <201311291436 dot rATEaZ5Z030292 at glazunov dot sibelius dot xs4all dot nl> <201311291605 dot rATG5XVb030184 at glazunov dot sibelius dot xs4all dot nl> <52994E79 dot 4000004 at codesourcery dot com> <5299B9D0 dot 2020304 at redhat dot com>
On Sat, Nov 30, 2013 at 2:11 AM, Pedro Alves <palves@redhat.com> 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.