History

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

Steven Rostedt committed 15 years ago

Commit 48bb5dc1 parent a0e0fac1 file · +3 −1Browse files

Unified · Split

scripts/recordmcount.h+3−1
@@ -261,11 +261,13 @@ static unsigned get_mcountsym(Elf_Sym const *const sym0, · 260 unmodified lines
261261 &sym0[Elf_r_sym(relp)];
262262 char const *symname = &str0[w(symp->st_name)];
263263 char const *mcount = gpfx == '_' ? "_mcount" : "mcount";
264+ char const *fentry = "__fentry__";
264265
265266 if (symname[0] == '.')
266267 ++symname; /* ppc64 hack */
267268 if (strcmp(mcount, symname) == 0 ||
268− (altmcount && strcmp(altmcount, symname) == 0))
269+ (altmcount && strcmp(altmcount, symname) == 0) ||
270+ (strcmp(fentry, symname) == 0))
269271 mcountsym = Elf_r_sym(relp);
270272
271273 return mcountsym;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t