aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/Kconfig5
-rw-r--r--kernel/trace/ftrace.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 036cec1fcd24..fd6754b88f87 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -47,6 +47,11 @@ config HAVE_FENTRY
47 help 47 help
48 Arch supports the gcc options -pg with -mfentry 48 Arch supports the gcc options -pg with -mfentry
49 49
50config HAVE_NOP_MCOUNT
51 bool
52 help
53 Arch supports the gcc options -pg with -mrecord-mcount and -nop-mcount
54
50config HAVE_C_RECORDMCOUNT 55config HAVE_C_RECORDMCOUNT
51 bool 56 bool
52 help 57 help
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 48b5b466ec7a..468e8527e979 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -2950,12 +2950,14 @@ static int ftrace_update_code(struct module *mod, struct ftrace_page *new_pgs)
2950 p = &pg->records[i]; 2950 p = &pg->records[i];
2951 p->flags = rec_flags; 2951 p->flags = rec_flags;
2952 2952
2953#ifndef CC_USING_NOP_MCOUNT
2953 /* 2954 /*
2954 * Do the initial record conversion from mcount jump 2955 * Do the initial record conversion from mcount jump
2955 * to the NOP instructions. 2956 * to the NOP instructions.
2956 */ 2957 */
2957 if (!ftrace_code_disable(mod, p)) 2958 if (!ftrace_code_disable(mod, p))
2958 break; 2959 break;
2960#endif
2959 2961
2960 update_cnt++; 2962 update_cnt++;
2961 } 2963 }