From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752696AbcBKImd (ORCPT ); Thu, 11 Feb 2016 03:42:33 -0500 Received: from verein.lst.de ([213.95.11.211]:45501 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751053AbcBKImc (ORCPT ); Thu, 11 Feb 2016 03:42:32 -0500 Date: Thu, 11 Feb 2016 09:42:30 +0100 From: Torsten Duwe To: Balbir Singh 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 Subject: Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables Message-ID: <20160211084230.GB29683@lst.de> References: <20160210174221.EBBEC692C8@newverein.lst.de> <20160210174450.9C065692C8@newverein.lst.de> <1455176897.2885.12.camel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1455176897.2885.12.camel@gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Torsten