From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ananth N Mavinakayanahalli Subject: Re: [PATCH -tip -v11 11/11] tracing: Add kprobes event profiling interface Date: Fri, 10 Jul 2009 10:47:27 +0530 Message-ID: <20090710051727.GA1745@in.ibm.com> References: <20090709202220.13223.97114.stgit@localhost.localdomain> <20090709202327.13223.16418.stgit@localhost.localdomain> Reply-To: ananth@in.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Ingo Molnar , Steven Rostedt , lkml, systemtap, kvm, DLE, Christoph Hellwig , Frederic Weisbecker , Tom Zanussi To: Masami Hiramatsu Return-path: Content-Disposition: inline In-Reply-To: <20090709202327.13223.16418.stgit@localhost.localdomain> List-Unsubscribe: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org List-Id: kvm.vger.kernel.org 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