[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1428083639.13180.44.camel@perches.com>
Date: Fri, 03 Apr 2015 10:53:59 -0700
From: Joe Perches <joe@...ches.com>
To: Madalin-Cristian Bucur <madalin.bucur@...escale.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"ruxandra.radulescu@...escale.com" <ruxandra.radulescu@...escale.com>
Subject: Re: [PATCH RFC 10/10] dpaa_eth: add trace points
On Fri, 2015-04-03 at 17:29 +0000, Madalin-Cristian Bucur wrote:
> > -----Original Message-----
> > From: Joe Perches [mailto:joe@...ches.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists