Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1216390

Re: [PATCH 21/22] xfs: %pF is only for function pointers

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From Scott Wood <scottwood@freescale.com>
Newsgroups linux.kernel
Subject Re: [PATCH 21/22] xfs: %pF is only for function pointers
Date Mon, 31 Aug 2015 21:30:01 +0200
Message-ID <q3CWd-ej-11@gated-at.bofh.it> (permalink)
References <p31Pc-6rY-3@gated-at.bofh.it> <p328y-6Oo-15@gated-at.bofh.it> <q3sk9-1RI-11@gated-at.bofh.it>
X-Original-To Dave Chinner <david@fromorbit.com>
Authentication-Results spf=none (sender IP is ) smtp.mailfrom=scottwood@freescale.com;
Content-Type text/plain; charset="UTF-8"
X-Mailer Evolution 3.16.0-fta1
MIME-Version 1.0
Content-Transfer-Encoding 7bit
X-Originating-IP [2601:448:8100:f9f:12bf:48ff:fe84:c9a0]
X-Clientproxiedby BLUPR11CA0067.namprd11.prod.outlook.com (10.141.30.35) To BY1PR03MB1483.namprd03.prod.outlook.com (25.162.210.141)
X-Microsoft-Exchange-Diagnostics 1;BY1PR03MB1483;2:vs7on0SyChk2jmj/p93Iohqiti8yWpNsvPGvhX9On4dXm7H7zugAy6IXGai/uQqyA9otRVIYnB2AqH7v7J9vJJPeKhyDmAT/hU2RyX/j9ds7yMsKwqBjrOfXdEeqRe8f9UTtwxEbh2GRhbWzPeDzBE0BIxGVd4rLNyxjgsEJthY=;3:SGLzJ+rSwfEId9MMi000OtM0mOvRF5KedB+/6MUKhNAzm0O9+qxvwkezLs+2w+StP1EvizkBo0n7IheA8ZCr9mAxhyDdiB6i/4OWmO8cIgTzB7Ss8LVTCnzAyig1kL+T0seu+LNcYa+uQox5MESr3Q==;25:3qoh3qLaguzyg9lKVcS425M7xd3e/obk5lve700FD2AYzSp8DgQVW/r619+Cj9bVoKx/+XteXmT9kIvx8eH3qS6lbQfGeKc0a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+Yw2R8R7vQgMeNlnEXQICRk
X-Microsoft-Antispam-Prvs <BY1PR03MB148377B0F972198E4D1FAE36B56B0@BY1PR03MB1483.namprd03.prod.outlook.com>
X-Exchange-Antispam-Report-Test UriScan:;
X-Exchange-Antispam-Report-Cfa-Test BCL:0;PCL:0;RULEID:(601004)(5005006)(8121501046)(3002001);SRVR:BY1PR03MB1483;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1483;
X-Forefront-Prvs 0685122203
X-Forefront-Antispam-Report SFV:NSPM;SFS:(10019020)(6009001)(199003)(377424004)(189002)(24454002)(4001540100001)(122386002)(92566002)(110136002)(40100003)(33646002)(103116003)(77096005)(189998001)(5001960100002)(36756003)(77156002)(50226001)(76176999)(105586002)(64706001)(68736005)(97736004)(86362001)(42186005)(87976001)(5001860100001)(5001830100001)(62966003)(5004730100002)(50986999)(106356001)(5007970100001)(2950100001)(19580405001)(47776003)(101416001)(19580395003)(23676002)(81156007)(5820100001)(50466002)(46102003)(99106002)(3826002)(5001840100002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR03MB1483;H:[IPv6:2601:448:8100:f9f:12bf:48ff:fe84:c9a0];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en;
Received-Spf None (protection.outlook.com: freescale.com does not designate permitted sender hosts)
X-Microsoft-Exchange-Diagnostics 1;BY1PR03MB1483;23:pTqIPUrkwFMYdOLDMPfmqSLyel3qNjCmci26hK9OjToM1LOMR8viJYWwX7kU1/fKTQU/XM0Fy+21jsk0yLK2v5z7toDm95mhuYBnAT4jo/EGA7yejzW6DUgPj4lmZxrHX0l6Fj0e36ACkYVMQovzwJCGr3RhyNBx1kjD13PhFiKutMSb1cmxi6C3kSQSe8QvwJHpIDvyRb3/rjRhepfLYoerNBBROuFc79IJMlVsYXMx+KReX6SnRLR4dGpulrRodFo+1tT4GAIfLBLLjBoU1Y/SWqKLJH4GmAgf9LBUhPSySQcG2UONxXWj74SLQmYz9th0w/cx+aVJ/2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OvYky7B096oSsE68GUNw8Q/VDGvf96eYp0hB2McOw==;24:JYo4gI2SWZWkEctFFVVarXsLB61ZK+b9nZLmbYQ+nAaZcrjD9xp6ySaKPD1tMJ7BOkHycTZmYdC1iGs5zASNKiRXQHIdXXZSugL3Q7C0AT8=;20:siAqYdHDJNi/FGlzqdKvsqmXhqlrBa8D7KZ4Fzj4kh8dUBIxjK8BbKunexzm1yR9etDZwj4orVFM9eUaOHqZWA==
Spamdiagnosticoutput 1:23
Spamdiagnosticmetadata NSPM
X-Originatororg freescale.com
X-Ms-Exchange-Crosstenant-Originalarrivaltime 31 Aug 2015 19:24:32.9503 (UTC)
X-Ms-Exchange-Crosstenant-Fromentityheader Hosted
X-Ms-Exchange-Transport-Crosstenantheadersstamped BY1PR03MB1483
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 62
Organization linux.* mail to news gateway
X-Original-Cc <trivial@kernel.org>, <linux-kernel@vger.kernel.org>, <xfs@oss.sgi.com>, Steven Rostedt <rostedt@goodmis.org>
X-Original-Date Mon, 31 Aug 2015 14:24:25 -0500
X-Original-Message-ID <1441049065.4966.38.camel@freescale.com>
X-Original-References <1426130037-17956-1-git-send-email-scottwood@freescale.com> <1426130037-17956-21-git-send-email-scottwood@freescale.com> <20150831080657.GF26895@dastard>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1216390

Show key headers only | View raw


On Mon, 2015-08-31 at 18:06 +1000, Dave Chinner wrote:
> On Wed, Mar 11, 2015 at 10:13:56PM -0500, Scott Wood wrote:
> > Use %pS for actual addresses, otherwise you'll get bad output
> > on arches like ppc64 where %pF expects a function descriptor.
> > 
> > Signed-off-by: Scott Wood <scottwood@freescale.com>
> > Cc: xfs@oss.sgi.com
> 
> Scott, I've just found that this change (commit 65dd297 "xfs: %pF is
> only for function pointers") breaks the symbolic printing in XFS
> trace events on x86_64. eg.
> 
> > diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
> > index 51372e3..b5ac81e 100644
> > --- a/fs/xfs/xfs_trace.h
> > +++ b/fs/xfs/xfs_trace.h
> > @@ -115,7 +115,7 @@ DECLARE_EVENT_CLASS(xfs_perag_class,
> >             __entry->refcount = refcount;
> >             __entry->caller_ip = caller_ip;
> >     ),
> > -   TP_printk("dev %d:%d agno %u refcount %d caller %pf",
> > +   TP_printk("dev %d:%d agno %u refcount %d caller %ps",
> >               MAJOR(__entry->dev), MINOR(__entry->dev),
> >               __entry->agno,
> >               __entry->refcount,
> 
> This results in output like this:
> 
> 760.828474: xfs_perag_get:  dev 253:32 agno 13 refcount 10 caller 
> 0xffffffff814eef02s
> 760.828476: xfs_perag_put:  dev 253:32 agno 13 refcount 9 caller 
> 0xffffffff814eefe8s
> 
> When I revert this commit, I get:
> 
> 71.911265: xfs_perag_get:   dev 253:32 agno 0 refcount 11 caller 
> xfs_extent_busy_insert
> 71.911266: xfs_perag_put:   dev 253:32 agno 0 refcount 10 caller 
> xfs_extent_busy_insert
> 
> Which is exactly what we should be getting from the tracing. I'm
> using trace-cmd to gather and print the events, and it breaks
> both old and current versions of trace-cmd.
> 
> Can you please look into why this change broke the tracing output
> on x86-64 - if there is no obvious/easy fix for it, then I'm simply
> going to revert it because having the tracing work correctly on
> x86-64 is far more important to us than ppc64 or ia64....

It looks like the cause is that TP_printk() is not really printk() -- it 
actually passes the format to userspace which has its own, not 100% 
compatible implementation pretty_print() in tools/lib/traceevent/event-
parse.c.  %pf in that function behaves like %ps in the kernel, and %ps is 
absent.

-Scott

--
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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 21/22] xfs: %pF is only for function pointers Dave Chinner <david@fromorbit.com> - 2015-08-31 10:10 +0200
  Re: [PATCH 21/22] xfs: %pF is only for function pointers Scott Wood <scottwood@freescale.com> - 2015-08-31 21:30 +0200
    Re: [PATCH 21/22] xfs: %pF is only for function pointers Steven Rostedt <rostedt@goodmis.org> - 2015-08-31 21:50 +0200
      Re: [PATCH 21/22] xfs: %pF is only for function pointers Scott Wood <scottwood@freescale.com> - 2015-08-31 22:00 +0200
        Re: [PATCH 21/22] xfs: %pF is only for function pointers Steven Rostedt <rostedt@goodmis.org> - 2015-08-31 22:10 +0200

csiph-web