From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 8AF281A003C for ; Thu, 11 Feb 2016 20:34:37 +1100 (AEDT) Received: by mail-pf0-x244.google.com with SMTP id 71so2289294pfv.1 for ; Thu, 11 Feb 2016 01:34:37 -0800 (PST) Message-ID: <1455183268.2885.17.camel@gmail.com> Subject: Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables From: Balbir Singh To: Torsten Duwe Cc: Michael Ellerman , Jiri Kosina , Miroslav Benes , Petr Mladek , Jessica Yu , Steven Rostedt , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org Date: Thu, 11 Feb 2016 20:34:28 +1100 In-Reply-To: <20160211084230.GB29683@lst.de> References: <20160210174221.EBBEC692C8@newverein.lst.de> <20160210174450.9C065692C8@newverein.lst.de> <1455176897.2885.12.camel@gmail.com> <20160211084230.GB29683@lst.de> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, 2016-02-11 at 09:42 +0100, Torsten Duwe wrote: > On Thu, Feb 11, 2016 at 06:48:17PM +1100, Balbir Singh wrote: > > On Wed, 2016-02-10 at 17:25 +0100, Torsten Duwe wrote: > > > + > > > +echo "int func() { return 0; }" | \ > > > +    $* -S -x c -O2 -p -mprofile-kernel - -o - 2> /dev/null | \ > > > +    sed -n -e '/func:/,/bl _mcount/p' | grep -q TOC > > > + > > > +leaf_toc_result=$? > > > + > > > > leaf_toc_result failed for me with gcc 5. I'll try and grab gcc-6 > > and give the patches a spin > > Don't bother. _All_ gccs are broken in that respect currently. > AFAIK Anton is working on this. You have to fake the test, like > static int a; return a++; > > Gcc fails to set the TOC for profiled "leaf" functions, where it > thinks no global/static symbols are referenced. > >  Thanks for the quick answer BTW, do we expect static/non global functions to be called from patched contexts? I understand that not supporting it will complicate a patch. Balbir Singh