diff options
author | Jamie Iles <jamie.iles@oracle.com> | 2013-11-05 05:42:09 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-11-05 16:07:50 -0500 |
commit | f02b625d0341519238ab3d9cc8706ff4bd45fb89 (patch) | |
tree | 2de8c17b0aa150de8383260626715496a3cd18a7 /scripts | |
parent | b5aa3a472b6d13d57a7521a663290dea2fb483a7 (diff) |
recordmcount.pl: Add support for __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. This is required for Ksplice as the C
version of recordmcount doesn't insert section symbols for the
__mcount_loc section so we fall back to the perl version.
Based on 48bb5dc6cd9d30fe0d594947563da1f8bd9abada (ftrace: Make
recordmcount.c handle __fentry__).
Link: http://lkml.kernel.org/r/1383648129-10724-1-git-send-email-jamie.iles@oracle.com
Signed-off-by: Jamie Iles <jamie.iles@oracle.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/recordmcount.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index a674fd5507c1..d0da66396f62 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl | |||
@@ -214,13 +214,13 @@ $local_regex = "^[0-9a-fA-F]+\\s+t\\s+(\\S+)"; | |||
214 | $weak_regex = "^[0-9a-fA-F]+\\s+([wW])\\s+(\\S+)"; | 214 | $weak_regex = "^[0-9a-fA-F]+\\s+([wW])\\s+(\\S+)"; |
215 | $section_regex = "Disassembly of section\\s+(\\S+):"; | 215 | $section_regex = "Disassembly of section\\s+(\\S+):"; |
216 | $function_regex = "^([0-9a-fA-F]+)\\s+<(.*?)>:"; | 216 | $function_regex = "^([0-9a-fA-F]+)\\s+<(.*?)>:"; |
217 | $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount\$"; | 217 | $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s(mcount|__fentry__)\$"; |
218 | $section_type = '@progbits'; | 218 | $section_type = '@progbits'; |
219 | $mcount_adjust = 0; | 219 | $mcount_adjust = 0; |
220 | $type = ".long"; | 220 | $type = ".long"; |
221 | 221 | ||
222 | if ($arch eq "x86_64") { | 222 | if ($arch eq "x86_64") { |
223 | $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount([+-]0x[0-9a-zA-Z]+)?\$"; | 223 | $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s(mcount|__fentry__)([+-]0x[0-9a-zA-Z]+)?\$"; |
224 | $type = ".quad"; | 224 | $type = ".quad"; |
225 | $alignment = 8; | 225 | $alignment = 8; |
226 | $mcount_adjust = -1; | 226 | $mcount_adjust = -1; |