[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-48bb5dc6cd9d30fe0d594947563da1f8bd9abada@git.kernel.org>
Date: Mon, 27 Aug 2012 10:03:33 -0700
From: tip-bot for Steven Rostedt <srostedt@...hat.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
andi@...stfloor.org, rostedt@...dmis.org, srostedt@...hat.com,
jreiser@...wagon.com, tglx@...utronix.de, hpa@...ux.intel.com
Subject: [tip:perf/core] ftrace: Make recordmcount.c handle __fentry__
Commit-ID: 48bb5dc6cd9d30fe0d594947563da1f8bd9abada
Gitweb: http://git.kernel.org/tip/48bb5dc6cd9d30fe0d594947563da1f8bd9abada
Author: Steven Rostedt <srostedt@...hat.com>
AuthorDate: Wed, 9 Feb 2011 13:13:23 -0500
Committer: Steven Rostedt <rostedt@...dmis.org>
CommitDate: Thu, 23 Aug 2012 11:24:43 -0400
ftrace: Make recordmcount.c handle __fentry__
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.
Link: http://lkml.kernel.org/r/20120807194058.990674363@goodmis.org
Acked-by: H. Peter Anvin <hpa@...ux.intel.com>
Acked-by: John Reiser <jreiser@...wagon.com>
Acked-by: Ingo Molnar <mingo@...nel.org>
Cc: Andi Kleen <andi@...stfloor.org>
Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
---
scripts/recordmcount.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
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 sym0,
&sym0[Elf_r_sym(relp)];
char const *symname = &str0[w(symp->st_name)];
char const *mcount = gpfx == '_' ? "_mcount" : "mcount";
+ char const *fentry = "__fentry__";
if (symname[0] == '.')
++symname; /* ppc64 hack */
if (strcmp(mcount, symname) == 0 ||
- (altmcount && strcmp(altmcount, symname) == 0))
+ (altmcount && strcmp(altmcount, symname) == 0) ||
+ (strcmp(fentry, symname) == 0))
mcountsym = Elf_r_sym(relp);
return mcountsym;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists