Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Doug Evans <dje@google.com>
Cc: Yao Qi <yao@codesourcery.com>,
	Mark Kettenis <mark.kettenis@xs4all.nl>,
	       gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 2/3] skip_prolgoue (amd64)
Date: Thu, 05 Dec 2013 11:47:00 -0000	[thread overview]
Message-ID: <52A067DA.7060304@redhat.com> (raw)
In-Reply-To: <CADPb22REFRk5r5sb_TmfduDEbos4sooF6LP9GKq9fXQ+g0T6GQ@mail.gmail.com>

On 12/04/2013 05:54 PM, Doug Evans wrote:
> 
> 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).

Right.  My view is that for a single quick operation, it's fine
to rely on the cache.  E.g., a backtrace, or printing a variable
while other threads are running.  GDB can give you skewed results
here with or without the cache.  Between single higher level operations
though, a lot of time could pass between two backtraces, and
the likeliness of the cache getting stale increases.  This
suggests investigating the idea of having the cache have a
time based lifetime, in addition.  Though I suspect that's a
lot of more complexity, for diminishing returns.  It's nice
that the second backtrace is faster than the first, but it's
really time of the first backtrace that we should be
optimizing for, IMO.

> It feels like there's diminishing returns and increasing costs the
> farther we go to try to protect the user from this.

Exactly.

Related, I've considered before that some memory accesses may
need to be atomic with the inferior (e.g., things like reading
dynamic linker structures), and that GDB core will need to know
to stop the target, batch a few reads, and re-resume the target.
And that that could also be extended to a user
knob -- "set want-to-be-sure-values-I'm-reading-aren't-skewed-by-running-threads-so-please-pause-them-for-me-as-needed on/off".
Possibly with a shorter spelling.  :-)

-- 
Pedro Alves


  parent reply	other threads:[~2013-12-05 11:47 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-29 14:27 [PATCH 0/3] Use target_read_code in skip_prologue Yao Qi
2013-11-29 14:27 ` [PATCH 2/3] skip_prolgoue (amd64) Yao Qi
2013-11-29 14:38   ` Mark Kettenis
2013-11-29 18:55     ` Mark Kettenis
2013-11-30  3:40       ` Yao Qi
2013-11-30 12:01         ` Pedro Alves
2013-12-02  7:34           ` Yao Qi
2013-12-03 18:28             ` Pedro Alves
2013-12-04  2:34             ` Yao Qi
2013-12-04 12:08               ` Pedro Alves
2013-12-04 15:38                 ` Tom Tromey
2013-12-04 18:31                   ` Doug Evans
2013-12-05 11:31                   ` Pedro Alves
2013-12-05  1:21                 ` Yao Qi
2013-12-05 12:08                   ` Pedro Alves
2013-12-05 14:08                     ` Yao Qi
2013-12-05 14:37                       ` Pedro Alves
2013-12-08  8:01                 ` Yao Qi
2013-12-08  8:26                   ` Doug Evans
2013-12-09  1:45                     ` Yao Qi
2013-12-09 11:32                       ` Pedro Alves
2013-12-09 11:53                   ` Pedro Alves
2013-12-09 13:03                     ` Yao Qi
2013-12-09 13:13                       ` Pedro Alves
2013-12-09 13:58                         ` Yao Qi
2013-12-09 15:34                           ` Pedro Alves
2013-12-10  0:57                             ` Yao Qi
2013-12-10 10:23                               ` Pedro Alves
2013-12-10 12:02                                 ` Yao Qi
2013-12-04 17:42             ` Doug Evans
2013-12-04 18:00             ` Doug Evans
2013-12-04 17:54           ` Doug Evans
2013-12-05  1:39             ` Yao Qi
2013-12-05 11:47             ` Pedro Alves [this message]
2013-11-29 14:36 ` [PATCH 1/3] Use target_read_code in skip_prologue (i386) Yao Qi
2013-11-30 11:43   ` Pedro Alves
2013-11-29 14:38 ` [PATCH 3/3] Perf test case: skip-prologue Yao Qi
2013-12-03  7:34   ` Yao Qi
2013-12-10 12:45     ` Yao Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52A067DA.7060304@redhat.com \
    --to=palves@redhat.com \
    --cc=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    --cc=yao@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox