|
From: Ananth N M. <an...@in...> - 2009-07-10 05:34:37
|
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
|