From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756224Ab2HGTlD (ORCPT ); Tue, 7 Aug 2012 15:41:03 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:4278 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751639Ab2HGTlB (ORCPT ); Tue, 7 Aug 2012 15:41:01 -0400 X-Authority-Analysis: v=2.0 cv=ZuBv2qHG c=1 sm=0 a=s5Htg7xnQOKvHEu9STBOug==:17 a=OpT9cpI26MMA:10 a=Ciwy3NGCPMMA:10 a=wZJmP7EHQPMA:10 a=5SG0PmZfjMsA:10 a=bbbx4UPp9XUA:10 a=meVymXHHAAAA:8 a=20KFwNOVAAAA:8 a=SyI_GHdlAAAA:8 a=WfulkdPnAAAA:8 a=8koy8i6ZauEDTfhOJWcA:9 a=QEXdDO2ut3YA:10 a=jEp0ucaQiEUA:10 a=UQxMgyrMzRwA:10 a=l29vjEC0CZ8A:10 a=jeBq3FmKZ4MA:10 a=XhqgqclYMmPRPohXQ6cA:9 a=s5Htg7xnQOKvHEu9STBOug==:117 X-Cloudmark-Score: 0 X-Originating-IP: 72.230.195.127 Message-Id: <20120807194058.990674363@goodmis.org> User-Agent: quilt/0.60-1 Date: Tue, 07 Aug 2012 15:38:46 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Ingo Molnar , Andrew Morton , Thomas Gleixner , Frederic Weisbecker , Masami Hiramatsu , Linus Torvalds , Andi Kleen , John Reiser Subject: [RFC PATCH 1/4] ftrace: Make recordmcount.c handle __fentry__ References: <20120807193845.146666357@goodmis.org> Content-Disposition: inline; filename=0001-ftrace-Make-recordmcount.c-handle-__fentry__.patch Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="00GvhwF7k39YY" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --00GvhwF7k39YY Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: Steven Rostedt With gcc 4.6.0 the -mfentry feature places the function profiling call at the start of the function. When this is used, the call is to __fentry__ and not mcount. Change recordmcount.c to record both callers to __fentry__ and mcount. Cc: John Reiser Cc: Andi Kleen Signed-off-by: Steven Rostedt --- scripts/recordmcount.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h index 54e35c1..9d1421e 100644 --- a/scripts/recordmcount.h +++ b/scripts/recordmcount.h @@ -261,11 +261,13 @@ static unsigned get_mcountsym(Elf_Sym const *const sy= m0, &sym0[Elf_r_sym(relp)]; char const *symname =3D &str0[w(symp->st_name)]; char const *mcount =3D gpfx =3D=3D '_' ? "_mcount" : "mcount"; + char const *fentry =3D "__fentry__"; =20 if (symname[0] =3D=3D '.') ++symname; /* ppc64 hack */ if (strcmp(mcount, symname) =3D=3D 0 || - (altmcount && strcmp(altmcount, symname) =3D=3D 0)) + (altmcount && strcmp(altmcount, symname) =3D=3D 0) || + (strcmp(fentry, symname) =3D=3D 0)) mcountsym =3D Elf_r_sym(relp); =20 return mcountsym; --=20 1.7.10.4 --00GvhwF7k39YY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAABAgAGBQJQIW9LAAoJEIy3vGnGbaoAuhgP/0GZMwOm+t0AUkhnZmgWCwlb oW6AB7/Jo7+oE72eDZtX9WUjYTMuyuz3Z7aNYtCK41n44tKydXIw6P9gHM0/zJtR BoCoTWeFjsLTxJKt5f8uS4/DjEiGgP86RcvXVRYeeH/Aey85t6Nro50D8kMR0Q5X HuTeoAJbAhSQFhSKncCS5TDYgV4J4Y6XeiD9WV1/A7CZDAlso14W+x8Q8VIcFjvg 1lkpAOXrCWKBz1fwj/mu5KvPu1O40+SqrLcFGgeImM12Co4PFh/5pJq4w55cZaxE wKlK6QjbztpJPKpMzGt7WAT32PKuxBjZOg4/V/+17oKSHqMaAJInaNsV9kxWLbVs EkJRhkk2nqMvo7OG/XLbwj8DDAoEsZZJc1r62LUdqy5U01f+ZBeZUR8u1OqRWIPR q9ui9RrDCoHRHQZobHPRyZJkYpcs4M/KwTAj+ItBWHuJzN/mCqXLvE/9dzBmKBlz JKLeMg35qAFVfTFoS1yLKdUkOyd3FQzLwi6bAHptBAWKTPh+LyAv07BKuzFM+AlP DbEPo7SYXAcoRTCZ9CqeuaHsjHzyrVuuosjtt1UH5WqTvW/MffEHrJTT9j1Un94r Jc/yGFfzKG2dTfsaIxWVY5NJpdGFXO90s59WwkR5BkKkjK4WvsSu67MKkYnL2ITA YNTJSFIJCSIQkSW9iSnS =hBn8 -----END PGP SIGNATURE----- --00GvhwF7k39YY--