This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH -tip -v11 11/11] tracing: Add kprobes event profiling interface


On Thu, Jul 09, 2009 at 04:23:27PM -0400, Masami Hiramatsu wrote:
> Add profiling interaces for each kprobes event.

...

>  /* Kprobe handler */
>  static __kprobes int kprobe_trace_func(struct kprobe *kp, struct pt_regs *regs)
>  {
> @@ -772,6 +809,8 @@ static __kprobes int kprobe_trace_func(struct kprobe *kp, struct pt_regs *regs)
>  	unsigned long irq_flags;
>  	struct ftrace_event_call *call = &tp->call;
> 
> +	tp->nhits++;
> +

If you just are looking for a count and aren't bothered about its
accuracy, this is fine. Else, handlers can run in parallel ;-)

Ananth


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]