Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754127AbZAFJhi (ORCPT ); Tue, 6 Jan 2009 04:37:38 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751720AbZAFJh2 (ORCPT ); Tue, 6 Jan 2009 04:37:28 -0500 Received: from mtagate5.de.ibm.com ([195.212.29.154]:63700 "EHLO mtagate5.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751707AbZAFJh0 (ORCPT ); Tue, 6 Jan 2009 04:37:26 -0500 Date: Tue, 6 Jan 2009 10:36:24 +0100 From: Heiko Carstens To: Steven Rostedt Cc: Sam Ravnborg , LKML , Steven Rostedt , Ingo Molnar , "David S. Miller" , sparclinux Subject: Re: ftrace breaks sparc64 build Message-ID: <20090106093624.GA5061@osiris.boeblingen.de.ibm.com> References: <20090105181922.GA25622@uranus.ravnborg.org> <20090105195415.GA6204@uranus.ravnborg.org> <20090105213107.GA27293@uranus.ravnborg.org> <20090105220156.GC8592@uranus.ravnborg.org> <20090105231136.GA5073@osiris.boeblingen.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2247 Lines: 60 On Mon, Jan 05, 2009 at 09:07:05PM -0500, Steven Rostedt wrote: > On Tue, 6 Jan 2009, Heiko Carstens wrote: > > On Mon, Jan 05, 2009 at 05:14:22PM -0500, Steven Rostedt wrote: > > > On Mon, 5 Jan 2009, Sam Ravnborg wrote: > > > > > > > > Is this all sparc cross compiler? I'm trying to reproduce it on x86 with > > > > > no avail :-( > > > > > > > > > > I would like to test other ways to change the macro, but to do so, I need > > > > > to get a compiler that will produce the warnings that you see. What > > > > > version of gcc are you using? > > > > > > > > I used crosstool to build a 3.4.5 gcc: > > > > > > Hmm, that's a pretty old compiler. I wonder if it wouldn't just help > > > if we just make the branch tracer dependent on the compiler used. That is. > > > > > > #if defined(CONFIG_PROFILE_ALL_BRANCHES) && (__GNUC__ >= 4) > > > #define if(cond) ... > > > > > > Or something :-/ > > > > FWIW, on s390 with gcc 4.3.2 and an allyesconfig I get these: > > > > CC arch/s390/mm/extmem.o > > arch/s390/mm/extmem.c: In function 'segment_modify_shared': > > arch/s390/mm/extmem.c:572: warning: 'end_addr' may be used uninitialized in this function > > arch/s390/mm/extmem.c:572: warning: 'start_addr' may be used uninitialized in this function > > arch/s390/mm/extmem.c: In function 'query_segment_type': > > arch/s390/mm/extmem.c:259: warning: 'vmrc' may be used uninitialized in this function > > > > Switching off PROFILE_ALL_BRANCHES makes the warnings go away again. > > Now that is really interesting. Because end_addr and start_addr are > initialized via functions: > > if (x) > init_me(a, &y); > else > init_me(b, &y); > > Which actually does not make sense why turning off PROFILE_ALL_BRANCHES > would affect this :-/ They are not necessarily initialized via 'initme'. Only if it returns with a return value >= 0. So it's a bit more complex: if (x) rc = init_me(a, &y); else rc = init_me(b, &y); if (rc < 0) /* y unitialized */ return; use(y); -- 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/