From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752802Ab0H0MiJ (ORCPT ); Fri, 27 Aug 2010 08:38:09 -0400 Received: from charlotte.tuxdriver.com ([70.61.120.58]:41349 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751569Ab0H0MiG (ORCPT ); Fri, 27 Aug 2010 08:38:06 -0400 Date: Fri, 27 Aug 2010 08:37:49 -0400 From: Neil Horman To: Koki Sanagi Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net, kaneshige.kenji@jp.fujitsu.com, izumi.taku@jp.fujitsu.com, kosaki.motohiro@jp.fujitsu.com, laijs@cn.fujitsu.com, scott.a.mcmillan@intel.com, rostedt@goodmis.org, eric.dumazet@gmail.com, fweisbec@gmail.com, mathieu.desnoyers@polymtl.ca Subject: Re: [RFC PATCH v4 2/5] napi: convert trace_napi_poll to TRACE_EVENT Message-ID: <20100827123749.GB17607@hmsreliant.think-freely.org> References: <4C4FCDA1.3000803@jp.fujitsu.com> <4C4FCE76.7030902@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C4FCE76.7030902@jp.fujitsu.com> User-Agent: Mutt/1.5.20 (2009-08-17) X-Spam-Score: -2.9 (--) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 28, 2010 at 03:30:14PM +0900, Koki Sanagi wrote: > From: Neil Horman > > This patch converts trace_napi_poll from DECLARE_EVENT to TRACE_EVENT to improve > the usability of napi_poll tracepoint. > > -0 [001] 241302.750777: napi_poll: napi poll on napi struct f6acc480 for device eth3 > -0 [000] 241302.852389: napi_poll: napi poll on napi struct f5d0d70c for device eth1 > > An original patch is below. > http://marc.info/?l=linux-kernel&m=126021713809450&w=2 > Signed-off-by: Neil Horman > > And add a fix by Steven Rostedt. > http://marc.info/?l=linux-kernel&m=126150506519173&w=2 > > Signed-off-by: Koki Sanagi > --- > include/trace/events/napi.h | 25 +++++++++++++++++++++++-- > 1 files changed, 23 insertions(+), 2 deletions(-) > Acked-by: Neil Horman > diff --git a/include/trace/events/napi.h b/include/trace/events/napi.h > index 188deca..8fe1e93 100644 > --- a/include/trace/events/napi.h > +++ b/include/trace/events/napi.h > @@ -6,10 +6,31 @@ > > #include > #include > +#include > + > +#define NO_DEV "(no_device)" > + > +TRACE_EVENT(napi_poll, > > -DECLARE_TRACE(napi_poll, > TP_PROTO(struct napi_struct *napi), > - TP_ARGS(napi)); > + > + TP_ARGS(napi), > + > + TP_STRUCT__entry( > + __field( struct napi_struct *, napi) > + __string( dev_name, napi->dev ? napi->dev->name : NO_DEV) > + ), > + > + TP_fast_assign( > + __entry->napi = napi; > + __assign_str(dev_name, napi->dev ? napi->dev->name : NO_DEV); > + ), > + > + TP_printk("napi poll on napi struct %p for device %s", > + __entry->napi, __get_str(dev_name)) > +); > + > +#undef NO_DEV > > #endif /* _TRACE_NAPI_H_ */ > > > -- > To unsubscribe from this list: send the line "unsubscribe netdev" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >