Re: KPROBES: Instrumenting a function's call site

2007-11-12 Thread Ananth N Mavinakayanahalli
On Thu, Nov 08, 2007 at 02:42:33PM -0500, Avishay Traeger wrote: > Sorry for reviving a thread from two months ago... :) > > On Wed, 2007-09-26 at 10:09 +0530, Ananth N Mavinakayanahalli wrote: > > On Tue, Sep 25, 2007 at 06:12:38PM -0400, Avishay Traeger wrote: > > > Hello, > > > I am trying to u

Re: KPROBES: Instrumenting a function's call site

2007-11-08 Thread Avishay Traeger
Sorry for reviving a thread from two months ago... :) On Wed, 2007-09-26 at 10:09 +0530, Ananth N Mavinakayanahalli wrote: > On Tue, Sep 25, 2007 at 06:12:38PM -0400, Avishay Traeger wrote: > > Hello, > > I am trying to use kprobes to measure the latency of a function by > > instrumenting its call

Re: KPROBES: Instrumenting a function's call site

2007-09-26 Thread Avishay Traeger
On Wed, 2007-09-26 at 10:28 -0700, Keshavamurthy, Anil S wrote: > On Wed, Sep 26, 2007 at 10:09:33AM +0530, Ananth N Mavinakayanahalli wrote: > > On Tue, Sep 25, 2007 at 06:12:38PM -0400, Avishay Traeger wrote: > > > Hello, > > > I am trying to use kprobes to measure the latency of a function by >

Re: KPROBES: Instrumenting a function's call site

2007-09-26 Thread Avishay Traeger
On Wed, 2007-09-26 at 22:57 +0530, Ananth N Mavinakayanahalli wrote: > On Wed, Sep 26, 2007 at 12:09:35PM -0400, Avishay Traeger wrote: > > On Wed, 2007-09-26 at 14:33 +0530, Ananth N Mavinakayanahalli wrote: > > > What happens when the "call" is singlestepped is that the instruction > > > pointer

Re: KPROBES: Instrumenting a function's call site

2007-09-26 Thread Keshavamurthy, Anil S
On Wed, Sep 26, 2007 at 10:09:33AM +0530, Ananth N Mavinakayanahalli wrote: > On Tue, Sep 25, 2007 at 06:12:38PM -0400, Avishay Traeger wrote: > > Hello, > > I am trying to use kprobes to measure the latency of a function by > > instrumenting its call site. Basically, I find the call instruction,

Re: KPROBES: Instrumenting a function's call site

2007-09-26 Thread Ananth N Mavinakayanahalli
On Wed, Sep 26, 2007 at 12:09:35PM -0400, Avishay Traeger wrote: > On Wed, 2007-09-26 at 14:33 +0530, Ananth N Mavinakayanahalli wrote: > > What happens when the "call" is singlestepped is that the instruction > > pointer is moved to the call target. That explains the lower latency you > > are seei

Re: KPROBES: Instrumenting a function's call site

2007-09-26 Thread Abhishek Sagar
On 9/26/07, Ananth N Mavinakayanahalli <[EMAIL PROTECTED]> wrote: > PS: There was a thought of providing a facility to run a handler at > function entry even when just a kretprobe is used. Maybe we need to > relook at that; it'd have been useful in this case. That would be really useful. I was wr

Re: KPROBES: Instrumenting a function's call site

2007-09-26 Thread Abhishek Sagar
On 9/26/07, Avishay Traeger <[EMAIL PROTECTED]> 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

Re: KPROBES: Instrumenting a function's call site

2007-09-26 Thread Avishay Traeger
On Wed, 2007-09-26 at 14:33 +0530, Ananth N Mavinakayanahalli wrote: > What happens when the "call" is singlestepped is that the instruction > pointer is moved to the call target. That explains the lower latency you > are seeing. You'll need to do something along the lines I suggested in > the earl

Re: KPROBES: Instrumenting a function's call site

2007-09-26 Thread Ananth N Mavinakayanahalli
On Wed, Sep 26, 2007 at 10:09:33AM +0530, Ananth N Mavinakayanahalli wrote: > On Tue, Sep 25, 2007 at 06:12:38PM -0400, Avishay Traeger wrote: > > Hello, > > I am trying to use kprobes to measure the latency of a function by > > instrumenting its call site. Basically, I find the call instruction,

Re: KPROBES: Instrumenting a function's call site

2007-09-25 Thread Ananth N Mavinakayanahalli
On Tue, Sep 25, 2007 at 06:12:38PM -0400, Avishay Traeger wrote: > Hello, > I am trying to use kprobes to measure the latency of a function by > instrumenting its call site. Basically, I find the call instruction, > and insert a kprobe with a pre-handler and post-handler at that point. > The pre-h

KPROBES: Instrumenting a function's call site

2007-09-25 Thread Avishay Traeger
Hello, I am trying to use kprobes to measure the latency of a function by instrumenting its call site. Basically, I find the call instruction, and insert a kprobe with a pre-handler and post-handler at that point. The pre-handler measures the latency (reads the TSC counter). The post-handler meas