public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "Stone, Joshua I" <joshua.i.stone@intel.com>
To: "Jun Koi" <junkoi2004@gmail.com>
Cc: <systemtap@sources.redhat.com>
Subject: RE: Improvement for post-handler only case in kprobes
Date: Mon, 30 Oct 2006 23:36:00 -0000	[thread overview]
Message-ID: <C56DB814FAA30B418C75310AC4BB279DD7AB2B@scsmsx413.amr.corp.intel.com> (raw)

On Sunday, October 29, 2006 6:02 AM, Jun Koi wrote:
> [...]
> In case we only has post-handler (NOT pre-handler), we can eliminate
> the single-mode step in the following way:
> - Still put BreakPoint at the registered address.
> - After the single-step, remove the old BreakPoint and put it at the
> current EIP (this is the place we switch out with single-step). Next
> time, we only need to handle the breakpoint, as it is hit right after
> the "original" breakpoint. Hence we dont need to get into the
> single-step mode any more. Of course this improves the performance.

So you're basically suggesting to turn a post-handler on a instruction
into a pre-handler on the following instruction?

This is equivalent only if you can guarantee that the two instructions
will always execute together.  Thus the first instruction cannot be a
control instruction (branch, jump, etc.), and the second cannot be the
target of any control instruction.  You would have to do full
basic-block analysis to guarantee this condition.

In any case, I don't think you'll save anything, because whatever
instruction is replaced with a breakpoint still needs to be executed.
This happens out-of-line and single-stepped.


Josh

             reply	other threads:[~2006-10-30 22:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-30 23:36 Stone, Joshua I [this message]
2006-10-31  9:51 ` Jun Koi
  -- strict thread matches above, loose matches on Subject: below --
2006-10-29 14:01 Jun Koi

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=C56DB814FAA30B418C75310AC4BB279DD7AB2B@scsmsx413.amr.corp.intel.com \
    --to=joshua.i.stone@intel.com \
    --cc=junkoi2004@gmail.com \
    --cc=systemtap@sources.redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).