linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"ruxandra.radulescu@freescale.com"
	<ruxandra.radulescu@freescale.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC 10/10] dpaa_eth: add trace points
Date: Fri, 03 Apr 2015 10:53:59 -0700	[thread overview]
Message-ID: <1428083639.13180.44.camel@perches.com> (raw)
In-Reply-To: <BL2PR03MB545935082A02251893B5070E6F10@BL2PR03MB545.namprd03.prod.outlook.com>

On Fri, 2015-04-03 at 17:29 +0000, Madalin-Cristian Bucur wrote:
> > -----Original Message-----
> > From: Joe Perches [mailto:joe@perches.com]
> >
> > On Wed, 2015-04-01 at 19:19 +0300, Madalin Bucur wrote:
> > > Add trace points on the hot processing path.
> > 
> > more trivia:
> > 
> > > diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth_trace.h
> > b/drivers/net/ethernet/freescale/dpaa/dpaa_eth_trace.h
> > []
> > > +#define fd_format_name(format)	{ qm_fd_##format, #format }
> > > +#define fd_format_list	\
> > > +	fd_format_name(contig),	\
> > > +	fd_format_name(sg)
> > 
> > Are these used anywhere?
> Yes, by the Frame Descriptor print:
> 
>         /* This is what gets printed when the trace event is triggered */
>         TP_printk(TR_FMT,
>                   __get_str(name), __entry->fqid, __entry->fd_addr,
>                   __print_symbolic(__entry->fd_format, fd_format_list), 		// <-- here
>                   __entry->fd_offset, __entry->fd_length, __entry->fd_status)

Thanks.

I think it's nicer when format and argument match
and aren't indirected by macros.

Perhaps this would be better as:

	TP_printk("[%s] fqid=%d, fd: addr=0x%llx, format=%s, off=%u, len=%u, status=0x%08x"
		  __get_str(name), __entry->fqid, __entry->fd_addr,
		  __print_symbolic(__entry->fd_format, fd_format_list),
		  __entry->fd_offset, __entry->fd_length, __entry->fd_status)


> Checkpatch seems to be less forgiving if the long string is not in a printk:

checkpatch is brainless, people aren't.

> WARNING: line over 80 characters
> #22: FILE: drivers/net/ethernet/freescale/dpaa/dpaa_eth_trace.h:47:
> +#define TR_FMT "[%s] fqid=%d, fd: addr=0x%llx, format=%s, off=%u, len=%u, status=0x%08x"

That's a checkpatch defect.  Thanks.  I'll see about fixing it.

  reply	other threads:[~2015-04-03 17:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-01 16:19 [PATCH RFC 02/10] dpaa_eth: add support for DPAA Ethernet Madalin Bucur
2015-04-01 16:19 ` [PATCH RFC 03/10] dpaa_eth: add configurable bpool thresholds Madalin Bucur
2015-04-01 16:19   ` [PATCH RFC 04/10] dpaa_eth: add support for S/G frames Madalin Bucur
2015-04-01 16:19     ` [PATCH RFC 05/10] dpaa_eth: add driver's Tx queue selection mechanism Madalin Bucur
2015-04-01 16:19       ` [PATCH RFC 06/10] dpaa_eth: add ethtool functionality Madalin Bucur
2015-04-01 16:19         ` [PATCH RFC 07/10] dpaa_eth: add sysfs exports Madalin Bucur
2015-04-01 16:19           ` [PATCH RFC 08/10] dpaa_eth: add debugfs counters Madalin Bucur
2015-04-01 16:19             ` [PATCH RFC 09/10] dpaa_eth: add debugfs entries Madalin Bucur
2015-04-01 16:19               ` [PATCH RFC 10/10] dpaa_eth: add trace points Madalin Bucur
2015-04-03 16:47                 ` Joe Perches
2015-04-03 17:29                   ` Madalin-Cristian Bucur
2015-04-03 17:53                     ` Joe Perches [this message]
2015-04-01 17:11         ` [PATCH RFC 06/10] dpaa_eth: add ethtool functionality Joe Perches
2015-04-01 17:11 ` [PATCH RFC 02/10] dpaa_eth: add support for DPAA Ethernet Joe Perches
2015-04-02 10:44 ` Paul Bolle
2015-04-03  8:58   ` Madalin-Cristian Bucur
2015-07-20  7:54 ` Joakim Tjernlund
2015-07-20  7:57   ` Joakim Tjernlund
2015-07-20 12:18     ` Madalin-Cristian Bucur
2015-07-20 12:46       ` Joakim Tjernlund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1428083639.13180.44.camel@perches.com \
    --to=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=madalin.bucur@freescale.com \
    --cc=netdev@vger.kernel.org \
    --cc=ruxandra.radulescu@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).