From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S944377AbcJSTWA (ORCPT ); Wed, 19 Oct 2016 15:22:00 -0400 Received: from smtprelay0060.hostedemail.com ([216.40.44.60]:43045 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S943992AbcJSTV7 (ORCPT ); Wed, 19 Oct 2016 15:21:59 -0400 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:1431:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2691:2895:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:5007:6119:6261:6691:7875:10004:10400:10848:10967:11026:11232:11473:11658:11914:12438:12740:12760:13069:13180:13229:13311:13357:13439:14096:14097:14181:14659:14721:21080:21434:30012:30054: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:1,LUA_SUMMARY:none X-HE-Tag: order85_85834382abc29 X-Filterd-Recvd-Size: 2411 Date: Wed, 19 Oct 2016 15:21:56 -0400 From: Steven Rostedt To: Arnaldo Carvalho de Melo Cc: Namhyung Kim , Honggyu Kim , linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo Subject: Re: [PATCH 1/3] tools lib traceevent: Add -O2 option to traceevent Message-ID: <20161019152156.4149ca74@gandalf.local.home> In-Reply-To: <20161019180548.GF25522@kernel.org> References: <20161017141712.11932-1-hong.gyu.kim@lge.com> <20161018020109.GA6099@danjae.aot.lge.com> <20161018112953.29e2126b@gandalf.local.home> <20161019174845.GE25522@kernel.org> <20161019180548.GF25522@kernel.org> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; 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 Wed, 19 Oct 2016 15:05:48 -0300 Arnaldo Carvalho de Melo wrote: > Some are the compiler not grokking logic where the compiler gets > confused with logic that tests one variable to use another and thinks it > is using garbage (uninitialized stuff), I tried to follow the logic and > I think it got slightly more confused than me, as I _think_ its not a > problem, but the one on the case entry for > > OLD_RINGBUF_TYPE_TIME_EXTEND > > in old_update_pointers() looks like a bug, unless some macro magic is > taking place that updates that 'lenght' variable. > > Rostedt, that -O2 unleashed some warnings, please check, I'll defer > applying those patches till it doesn't show these warnings, i.e. till > other patches fixing these issues or simply silencing the compiler with > a harmless init gets submitted, > > Thanks, Note, that code is for the first version of the ftrace ring buffer that got changed around 2.6.32 I believe. And since trace-cmd was the only tool that directly looked at the code, I was able to "break" abi and update trace-cmd to have a new version. So that code isn't even used anywhere on newer kernels. That said, could you add in the case statement for OLD_RINGBUF_TYPE_TIME_EXTEND: length = 0; I think that should be fine. -- Steve