From: Kevin Buettner <kevinb@redhat.com>
To: archer@sourceware.org
Subject: Re: Q: ugdb && watchpoints
Date: Tue, 19 Oct 2010 22:04:00 -0000 [thread overview]
Message-ID: <20101019150421.1b0f51df@mesquite.lan> (raw)
In-Reply-To: <20101019181159.GA10275@redhat.com>
On Tue, 19 Oct 2010 20:11:59 +0200
Oleg Nesterov <oleg@redhat.com> wrote:
> I was even thinking about serializing. That is, ugdb schedules only
> one thread to step every time. This way at least we can always know
> who changes the memory. But this is non-trivial, very bad from
> perfomance pov, and doesn't work with syscalls.
I think that stepping one thread at a time is the approach that must
be taken if you want to accurately report the thread that triggered
the watchpoint. (I don't understand the issue with syscalls though...)
> Any advice is very much appreciated. Most probably, there is no any
> clever solution. Once a traced sub-thread detects that a watchpoint
> was changed, it should mark this wp as "reported" for other threads
> and report it to gdb. IOW, we report the random thread and random wp.
Is there a big performance win in implementing software watchpoints in
ugdb? If not, I wouldn't worry about it. My experience with software
watchpoints in native gdb is that they're *very* slow and, as such,
are often not worth using at all.
> Another question. I guess, ugdb should implement hardware watchpoints
> as well? Otherwise, there is no any improvement compared to gdbserver
> in the likely case (at least I think that a-lot-of-wps is not that
> common). But we only have Z2 for both. So I assume that ugdb should
> try to use the hardware watchpoints, but silently fall back to
> emulating?
IMO, hardware watchpoints are definitely worth implementing. From
a user perspective, I would prefer that the stub not implement software
watchpoint support when the real hardware watchpoints are used up.
Hope this helps...
Kevin
prev parent reply other threads:[~2010-10-19 22:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-19 18:16 Oleg Nesterov
2010-10-19 22:04 ` Kevin Buettner [this message]
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=20101019150421.1b0f51df@mesquite.lan \
--to=kevinb@redhat.com \
--cc=archer@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).