This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH -tip -v11 11/11] tracing: Add kprobes event profiling interface
- From: Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>
- To: Masami Hiramatsu <mhiramat at redhat dot com>
- Cc: Ingo Molnar <mingo at elte dot hu>, Steven Rostedt <rostedt at goodmis dot org>, lkml<linux-kernel at vger dot kernel dot org>, systemtap<systemtap at sources dot redhat dot com>, kvm<kvm at vger dot kernel dot org>, DLE<dle-develop at lists dot sourceforge dot net>, Christoph Hellwig <hch at infradead dot org>, Frederic Weisbecker <fweisbec at gmail dot com>, Tom Zanussi <tzanussi at gmail dot com>
- Date: Fri, 10 Jul 2009 10:47:27 +0530
- Subject: Re: [PATCH -tip -v11 11/11] tracing: Add kprobes event profiling interface
- References: <20090709202220.13223.97114.stgit@localhost.localdomain> <20090709202327.13223.16418.stgit@localhost.localdomain>
- Reply-to: ananth at in dot ibm dot com
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