[PATCH -tip -v11 11/11] tracing: Add kprobes event profiling interface
Ananth N Mavinakayanahalli
ananth@in.ibm.com
Fri Jul 10 05:17:00 GMT 2009
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
More information about the Systemtap
mailing list