From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: Tristan Gingold <gingold@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] PR threads/10729: x86 hw watchpoints and non-stop mode
Date: Mon, 12 Dec 2011 18:38:00 -0000 [thread overview]
Message-ID: <20111212172238.GA7737@host2.jankratochvil.net> (raw)
In-Reply-To: <201112121656.44478.pedro@codesourcery.com>
On Mon, 12 Dec 2011 17:56:44 +0100, Pedro Alves wrote:
> I'm trying out this patch:
That's great, thanks.
> > Deleting this part is a regression. Testcase for that part is attached.
I will yet update the testcase to support gdbserver.
> > > + && I386_DR_GET_RW_LEN (control, i) != 0)
> > > {
> > > - addr = state->dr_mirror[i];
> > > + addr = i386_dr_low.get_addr (i);
> >
> > Why to do this change? Why we can no longer trust DR_MIRROR? This is
> > a performance regression.
>
> This is non-stop, so threads can be running while we change the
> global state->dr_mirror (and friends). Say, we set a watchpoint,
> and let the threads rusume. Now, say you delete the watchpoint, or
> add/remove watchpoints such that state->dr_mirror[*] changes. Inserting/deleting
> watchpoines updates state->dr_mirror[*]. Now threads haven't been updated
> with the mirror yet, and say a thread has meanwhile hit an old watchpoint,
> but we haven't handled the SIGTRAP yet. If we trusted state->dr_mirror[*],
> we'd mistake the real trapped address to whatever was
> currently state->dr_mirror[i]. So state->dr_mirror now represents
> intention. To get at the address that trapped, we need to read the
> state the thread had when it trapped. I'll add some comments to the code.
Thanks for the explanation, yes, comment would be great.
As there is a state for each inferior in the multi-inferior patch of mine it
may be useful to change it to be per-TID so these ptrace reads can be avoided.
Thanks,
Jan
next prev parent reply other threads:[~2011-12-12 17:23 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-05 16:46 Pedro Alves
2011-12-05 17:06 ` Eli Zaretskii
2011-12-09 16:30 ` New tests to watch regions larger than a machine word (Re: [PATCH] PR threads/10729: x86 hw watchpoints and non-stop mode) Pedro Alves
2011-12-09 19:11 ` Eli Zaretskii
2011-12-13 16:12 ` Pedro Alves
2011-12-05 21:24 ` [PATCH] PR threads/10729: x86 hw watchpoints and non-stop mode Jan Kratochvil
2011-12-09 16:45 ` Pedro Alves
2011-12-09 16:47 ` Tristan Gingold
2011-12-09 19:23 ` Eli Zaretskii
2011-12-13 16:26 ` Pedro Alves
2011-12-11 23:39 ` Jan Kratochvil
2011-12-12 11:53 ` Pedro Alves
2011-12-12 14:49 ` Jan Kratochvil
2011-12-12 0:14 ` Jan Kratochvil
2011-12-12 17:23 ` Pedro Alves
2011-12-12 18:38 ` Jan Kratochvil [this message]
2011-12-12 20:14 ` Jan Kratochvil
2011-12-12 20:30 ` Pedro Alves
2011-12-13 17:24 ` Jan Kratochvil
2011-12-13 18:49 ` Pedro Alves
2011-12-13 19:25 ` Jan Kratochvil
2011-12-16 16:16 ` Pedro Alves
2012-01-20 19:51 ` testsuite: native/non-extended/extended modes [Re: [PATCH] PR threads/10729: x86 hw watchpoints and non-stop mode] Jan Kratochvil
2012-01-20 19:53 ` Pedro Alves
2012-01-20 19:57 ` Jan Kratochvil
2011-12-12 20:34 ` [PATCH] PR threads/10729: x86 hw watchpoints and non-stop mode Pedro Alves
2011-12-12 21:39 ` Jan Kratochvil
2011-12-13 16:21 ` Fix PR remote/13492 (Re: [PATCH] PR threads/10729: x86 hw watchpoints and non-stop mode) Pedro Alves
2011-12-13 17:23 ` Fix PR remote/13492 Jan Kratochvil
2011-12-13 16:33 ` [PATCH] PR threads/10729: x86 hw watchpoints and non-stop mode Pedro Alves
2011-12-13 18:57 ` Jan Kratochvil
2011-12-14 17:35 ` Pedro Alves
2011-12-14 17:42 ` Pedro Alves
2011-12-15 8:48 ` Regression for T (Stopped) processes [Re: [PATCH] PR threads/10729: x86 hw watchpoints and non-stop mode] Jan Kratochvil
2011-12-15 12:44 ` Pedro Alves
2011-12-15 15:33 ` Jan Kratochvil
2011-12-13 22:27 ` [PATCH] PR threads/10729: x86 hw watchpoints and non-stop mode Jan Kratochvil
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=20111212172238.GA7737@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=gingold@adacore.com \
--cc=pedro@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