Skip to content

Commit f02b625

Browse files
jamieilesrostedt
authored andcommitted
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 48bb5dc (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>
1 parent b5aa3a4 commit f02b625

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎scripts/recordmcount.pl‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,13 @@ sub check_objcopy
214214
$weak_regex = "^[0-9a-fA-F]+\\s+([wW])\\s+(\\S+)";
215215
$section_regex = "Disassembly of section\\s+(\\S+):";
216216
$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__)\$";
218218
$section_type = '@progbits';
219219
$mcount_adjust = 0;
220220
$type = ".long";
221221

222222
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]+)?\$";
224224
$type = ".quad";
225225
$alignment = 8;
226226
$mcount_adjust = -1;

0 commit comments

Comments
 (0)