Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752223AbbDCR34 (ORCPT ); Fri, 3 Apr 2015 13:29:56 -0400 Received: from mail-by2on0107.outbound.protection.outlook.com ([207.46.100.107]:22767 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750767AbbDCR3x convert rfc822-to-8bit (ORCPT ); Fri, 3 Apr 2015 13:29:53 -0400 From: Madalin-Cristian Bucur To: Joe Perches CC: "netdev@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , "ruxandra.radulescu@freescale.com" Subject: RE: [PATCH RFC 10/10] dpaa_eth: add trace points Thread-Topic: [PATCH RFC 10/10] dpaa_eth: add trace points Thread-Index: AQHQbJe8LiASIGuWd0aQkUd1D0Rlgp07gm2AgAALvwA= Date: Fri, 3 Apr 2015 17:29:49 +0000 Message-ID: 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> <1428079621.13180.10.camel@perches.com> In-Reply-To: <1428079621.13180.10.camel@perches.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.88.166.1] authentication-results: perches.com; dkim=none (message not signed) header.d=none; x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0654;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0639; x-forefront-antispam-report: BMV:1;SFV:NSPM;SFS:(10019020)(6009001)(24454002)(13464003)(377424004)(51704005)(62966003)(110136001)(92566002)(106116001)(50986999)(2900100001)(87936001)(2950100001)(54356999)(122556002)(77156002)(102836002)(33656002)(77096005)(76176999)(86362001)(19580395003)(46102003)(99286002)(76576001)(66066001)(40100003)(19580405001)(2656002)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR0301MB0654;H:BL2PR03MB545.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5002010)(5005006);SRVR:DM2PR0301MB0654;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0654; x-forefront-prvs: 05352A48BE Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Apr 2015 17:29:49.5749 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB0654 X-OriginatorOrg: freescale.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1992 Lines: 57 > -----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) > > +#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) > Checkpatch seems to be less forgiving if the long string is not in a printk: 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" Madalin -- 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/