From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22554 invoked by alias); 10 Jul 2009 05:17:46 -0000 Received: (qmail 22545 invoked by uid 22791); 10 Jul 2009 05:17:45 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,NO_DNS_FOR_FROM X-Spam-Check-By: sourceware.org Received: from e36.co.us.ibm.com (HELO e36.co.us.ibm.com) (32.97.110.154) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 10 Jul 2009 05:17:39 +0000 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e36.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id n6A5G3Ka014390 for ; Thu, 9 Jul 2009 23:16:03 -0600 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n6A5HZhM142150 for ; Thu, 9 Jul 2009 23:17:35 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n6A5HY8k002751 for ; Thu, 9 Jul 2009 23:17:35 -0600 Received: from thinktux.in.ibm.com ([9.124.211.104]) by d03av04.boulder.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n6A5HXfN002640; Thu, 9 Jul 2009 23:17:34 -0600 Received: by thinktux.in.ibm.com (Postfix, from userid 500) id 0EE23895AC; Fri, 10 Jul 2009 10:47:28 +0530 (IST) Date: Fri, 10 Jul 2009 05:17:00 -0000 From: Ananth N Mavinakayanahalli To: Masami Hiramatsu Cc: Ingo Molnar , Steven Rostedt , lkml, systemtap, kvm, DLE, Christoph Hellwig , Frederic Weisbecker , Tom Zanussi Subject: Re: [PATCH -tip -v11 11/11] tracing: Add kprobes event profiling interface Message-ID: <20090710051727.GA1745@in.ibm.com> Reply-To: ananth@in.ibm.com References: <20090709202220.13223.97114.stgit@localhost.localdomain> <20090709202327.13223.16418.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090709202327.13223.16418.stgit@localhost.localdomain> User-Agent: Mutt/1.5.17 (2007-11-01) X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2009-q3/txt/msg00078.txt.bz2 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