From: Xin Tong <xerox.time.tech@gmail.com>
To: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Cc: "Gustavo, Luis" <luis_gustavo@mentor.com>, gdb@sourceware.org
Subject: Re: Hardware watchpoint for read
Date: Thu, 03 May 2012 19:41:00 -0000 [thread overview]
Message-ID: <CALKntY1qTnXd1g2dEXzitTWH6Q2zD5HNu2NaAvfk7GaME=JjVw@mail.gmail.com> (raw)
In-Reply-To: <30865C01C5AF4B6B9B01901B792C4EF5@soleil>
On Thu, May 3, 2012 at 3:19 PM, Philippe Waroquiers
<philippe.waroquiers@skynet.be> wrote:
>>> what are the performance penalties of having a watchpoint on a memory
>>> location in the state of the art x86 processor. Because it might be
>>> implemented with a parallel circuitry in the processor, my guess is
>>> that it could be cheap.
>>
>>
>> Do you mean a hardware watchpoint? It's hard to say for sure without
>> looking at the processors inner workings, but the penalty is probably very
>> small.
>>
>> When the conditions are satisfied, a TRAP will be generated and it will
>> get through to the debugger via the kernel.
>>
>> Suppose we issue a continue command... For the debugger, the inferior will
>> run uninterrupted while the hardware watchpoint is active.
>>
>> This is not the case with software watchpoints, as the debugger will be
>> constantly touching the inferior while it runs.
>
> Which makes software watchpoints extremely slow, while hardware
> watchpoints have limitations (e.g. in nr or size).
> Note that the Valgrind gdbserver (in 3.7.0) provides "unlimited simulated
> hw watchpoints" : these are slower than real hw watchpoints, but "only"
> suffer from the Valgrind slowdown.
>
> Philippe
>
The breakpoint instructions (int 3 on x86) are inserted in the
translation process ?
Xin
next prev parent reply other threads:[~2012-05-03 19:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-24 13:03 Xin Tong
2012-04-24 13:09 ` Luis Gustavo
2012-04-24 13:16 ` Xin Tong
2012-04-24 13:18 ` Luis Gustavo
2012-04-24 14:18 ` Xin Tong
2012-04-24 14:20 ` Luis Gustavo
2012-04-24 15:06 ` Xin Tong
2012-04-24 15:11 ` Luis Gustavo
2012-04-25 1:15 ` Xin Tong
2012-04-25 11:51 ` Luis Gustavo
2012-05-03 19:19 ` Philippe Waroquiers
2012-05-03 19:41 ` Xin Tong [this message]
2012-05-03 21:18 ` Philippe Waroquiers
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='CALKntY1qTnXd1g2dEXzitTWH6Q2zD5HNu2NaAvfk7GaME=JjVw@mail.gmail.com' \
--to=xerox.time.tech@gmail.com \
--cc=gdb@sourceware.org \
--cc=luis_gustavo@mentor.com \
--cc=philippe.waroquiers@skynet.be \
/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).