diff options
author | Steven Rostedt <[email protected]> | 2011-02-09 13:13:23 -0500 |
---|---|---|
committer | Steven Rostedt <[email protected]> | 2012-08-23 11:24:43 -0400 |
commit | 48bb5dc6cd9d30fe0d594947563da1f8bd9abada (patch) | |
tree | d6285f1c7ab68e07f9d65d62b62d6e958b66b0db | |
parent | a0e0fac633bed47c15cab744663d8c67f8f3421d (diff) |
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/[email protected]
Acked-by: H. Peter Anvin <[email protected]>
Acked-by: John Reiser <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Cc: Andi Kleen <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
-rw-r--r-- | scripts/recordmcount.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h index 54e35c1e5948..9d1421e63ff8 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; |