From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752550AbbKPWXJ (ORCPT ); Mon, 16 Nov 2015 17:23:09 -0500 Received: from smtprelay0008.hostedemail.com ([216.40.44.8]:39606 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752386AbbKPWXE (ORCPT ); Mon, 16 Nov 2015 17:23:04 -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:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2693:2895:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3871:3872:4321:5007:6261:7875:7903:8603:10004:10400:10848:10967:11232:11658:11914:12043:12296:12517:12519:12555:12740:13069:13255:13311:13357:14096:14097:14659:21080:21088:30012:30054:30056:30070: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: coat62_54daed167fe1f X-Filterd-Recvd-Size: 2055 Date: Mon, 16 Nov 2015 17:23:02 -0500 From: Steven Rostedt To: Arnaldo Carvalho de Melo Cc: LKML , Ingo Molnar , Namhyung Kim Subject: Re: [PATCH] tools lib traceevents: Fix output of %llu for 64 bit values read on 32 bit machines Message-ID: <20151116172302.0a9326b5@gandalf.local.home> In-Reply-To: <20151116153310.326c1558@gandalf.local.home> References: <20151116153310.326c1558@gandalf.local.home> X-Mailer: Claws Mail 3.13.0 (GTK+ 2.24.28; 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 Mon, 16 Nov 2015 15:33:10 -0500 Steven Rostedt wrote: > When a long value is read on 32 bit machines for 64 bit output, the parsing > needs to change "%lu" into "%llu", as the value is read natively. > > Unfortunately, if "%llu" is already there, the code will add another "l" to > it and fail to parse it properly. > > Cc: stable@vger.kernel.org > Signed-off-by: Steven Rostedt > --- > tools/lib/traceevent/event-parse.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c > index 4d885934b919..43e202bb3ae3 100644 > --- a/tools/lib/traceevent/event-parse.c > +++ b/tools/lib/traceevent/event-parse.c > @@ -4895,7 +4895,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event > break; > } > } > - if (pevent->long_size == 8 && ls && > + if (pevent->long_size == 8 && ls == 1 && Bah, this breaks %p when reading on 32bit. Update patch coming -- Steve > sizeof(long) != 8) { > char *p; >