Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753301AbbDCQrH (ORCPT ); Fri, 3 Apr 2015 12:47:07 -0400 Received: from smtprelay0073.hostedemail.com ([216.40.44.73]:48051 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751534AbbDCQrF (ORCPT ); Fri, 3 Apr 2015 12:47:05 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:966:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2196:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3871:3872:4321:4385:5007:6120:6261:7901:10004:10400:10848:11026:11232:11657:11658:11914:12043:12296:12517:12519:12740:13069:13311:13357:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: patch76_5a9fd19f74c36 X-Filterd-Recvd-Size: 2429 Message-ID: <1428079621.13180.10.camel@perches.com> Subject: Re: [PATCH RFC 10/10] dpaa_eth: add trace points From: Joe Perches To: madalin.bucur@freescale.com Cc: netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Ruxandra Ioana Radulescu Date: Fri, 03 Apr 2015 09:47:01 -0700 In-Reply-To: <1427905196-27778-9-git-send-email-madalin.bucur@freescale.com> References: <1427905196-27778-1-git-send-email-madalin.bucur@freescale.com> <1427905196-27778-2-git-send-email-madalin.bucur@freescale.com> <1427905196-27778-3-git-send-email-madalin.bucur@freescale.com> <1427905196-27778-4-git-send-email-madalin.bucur@freescale.com> <1427905196-27778-5-git-send-email-madalin.bucur@freescale.com> <1427905196-27778-6-git-send-email-madalin.bucur@freescale.com> <1427905196-27778-7-git-send-email-madalin.bucur@freescale.com> <1427905196-27778-8-git-send-email-madalin.bucur@freescale.com> <1427905196-27778-9-git-send-email-madalin.bucur@freescale.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1204 Lines: 35 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? > +#define TR_FMT "[%s] fqid=%d, fd: addr=0x%llx, format=%s, off=%u, len=%u," \ > + " status=0x%08x" It's nicer to coalesce string fragments. Unless this is intended to be used more than once, perhaps it's better to remove it and use the string directly instead. > + /* 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), > + __entry->fd_offset, __entry->fd_length, __entry->fd_status) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/