mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Abhishek Sagar" <sagar.abhishek@gmail.com>
To: "Avishay Traeger" <atraeger@cs.sunysb.edu>
Cc: prasanna@in.ibm.com, ananth@in.ibm.com,
	anil.s.keshavamurthy@intel.com, davem@davemloft.net,
	linux-kernel@vger.kernel.org
Subject: Re: KPROBES: Instrumenting a function's call site
Date: Wed, 26 Sep 2007 22:07:50 +0530	[thread overview]
Message-ID: <863e9df20709260937v79d555ffn49f3b8ff7aba42cb@mail.gmail.com> (raw)
In-Reply-To: <1190758358.30061.13.camel@rockstar.fsl.cs.sunysb.edu>

On 9/26/07, Avishay Traeger <atraeger@cs.sunysb.edu> wrote:
> So to measure the latency of foo(), I basically want kprobes to do this:
> pre_handler();
> foo();
> post_handler();
>
> The problem is that the latencies that I am getting are consistently low
> (~10,000 cycles).  When I manually instrument the functions, the latency
> is about 20,000,000 cycles.  Clearly something is not right here.

Single-stepping is done with preemption (and on some archs like ARM,
interrupts) disabled. May be that is contributing to such a skew.

> Is this a known issue?  Instead of using the post-handler, I can try to
> add a kprobe to the following instruction with a pre-handler.  I was
> just curious if there was something fundamentally wrong with the
> approach I took, or maybe a bug that you should be made aware of.
>
> Please CC me on any replies (not subscribed to LKML).
>
> Thanks,
> Avishay
>
--
Regards
Abhishek Sagar

-
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

      parent reply	other threads:[~2007-09-26 16:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-25 22:12 Avishay Traeger
2007-09-26  4:39 ` Ananth N Mavinakayanahalli
2007-09-26  9:03   ` Ananth N Mavinakayanahalli
2007-09-26 16:09     ` Avishay Traeger
2007-09-26 17:27       ` Ananth N Mavinakayanahalli
2007-09-26 17:35         ` Avishay Traeger
2007-09-26 16:52   ` Abhishek Sagar
2007-09-26 17:28   ` Keshavamurthy, Anil S
2007-09-26 17:37     ` Avishay Traeger
2007-11-08 19:42   ` Avishay Traeger
2007-11-12 10:27     ` Ananth N Mavinakayanahalli
2007-09-26 16:37 ` Abhishek Sagar [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=863e9df20709260937v79d555ffn49f3b8ff7aba42cb@mail.gmail.com \
    --to=sagar.abhishek@gmail.com \
    --cc=ananth@in.ibm.com \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=atraeger@cs.sunysb.edu \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=prasanna@in.ibm.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

all inboxes | Powered by JetHome®