From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753357AbcBWOaN (ORCPT ); Tue, 23 Feb 2016 09:30:13 -0500 Received: from smtprelay0149.hostedemail.com ([216.40.44.149]:38230 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752139AbcBWOaL (ORCPT ); Tue, 23 Feb 2016 09:30:11 -0500 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2693:2914:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:5007:6119:6261:7875:7903:7904:10004:10400:10848:10967:11232:11658:11914:12114:12517:12519:12740:13069:13161:13229:13255:13311:13357:14096:14097:14659:21080:30054:30090:30091,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,LFtime:2,LUA_SUMMARY:none X-HE-Tag: word25_75c0701431952 X-Filterd-Recvd-Size: 1999 Date: Tue, 23 Feb 2016 09:30:08 -0500 From: Steven Rostedt To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Thomas Gleixner , Juri Lelli , Clark Williams , Andrew Morton Subject: Re: [PATCH 4/4] tracing: Add __print_ns_to_secs() and __print_ns_without_secs() helpers Message-ID: <20160223093008.072e1955@gandalf.local.home> In-Reply-To: <20160223140143.GK6356@twins.programming.kicks-ass.net> References: <20160222212649.485719441@goodmis.org> <20160222212825.900322488@goodmis.org> <20160223124915.GQ6357@twins.programming.kicks-ass.net> <20160223081757.59f3b698@gandalf.local.home> <20160223140143.GK6356@twins.programming.kicks-ass.net> X-Mailer: Claws Mail 3.13.1 (GTK+ 2.24.29; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 23 Feb 2016 15:01:43 +0100 Peter Zijlstra wrote: > > We have "%llu.%09ul" which is two arguments in the printf(). And the > > values we are processing can't be modified. Which is why the macro uses > > ({ }) and creates a temp variable. > > Hurm,. yes that's not something easily done. We need a temporary limited > in scope to the printf statement, and C doesn't really do that. The nice thing is, the division is done on output, which is considered the slow path. Having two divisions instead of just one may be inconvenient, but it's not slowing much down. And that's only performed when reading the ASCII trace files. If you use perf or trace-cmd, the event-parser will do the work for you at post processing. -- Steve