File tree Expand file tree Collapse file tree 7 files changed +728
-0
lines changed Expand file tree Collapse file tree 7 files changed +728
-0
lines changed Original file line number Diff line number Diff line change @@ -568,6 +568,12 @@ endif
568
568
569
569
ifdef CONFIG_FUNCTION_TRACER
570
570
KBUILD_CFLAGS += -pg
571
+ ifdef CONFIG_DYNAMIC_FTRACE
572
+ ifdef CONFIG_HAVE_C_RECORDMCOUNT
573
+ BUILD_C_RECORDMCOUNT := y
574
+ export BUILD_C_RECORDMCOUNT
575
+ endif
576
+ endif
571
577
endif
572
578
573
579
# We trigger additional mismatches with less inlining
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ config X86
33
33
select HAVE_KRETPROBES
34
34
select HAVE_OPTPROBES
35
35
select HAVE_FTRACE_MCOUNT_RECORD
36
+ select HAVE_C_RECORDMCOUNT
36
37
select HAVE_DYNAMIC_FTRACE
37
38
select HAVE_FUNCTION_TRACER
38
39
select HAVE_FUNCTION_GRAPH_TRACER
Original file line number Diff line number Diff line change @@ -49,6 +49,11 @@ config HAVE_SYSCALL_TRACEPOINTS
49
49
help
50
50
See Documentation/trace/ftrace-design.txt
51
51
52
+ config HAVE_C_RECORDMCOUNT
53
+ bool
54
+ help
55
+ C version of recordmcount available?
56
+
52
57
config TRACER_MAX_TRACE
53
58
bool
54
59
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ hostprogs-$(CONFIG_KALLSYMS) += kallsyms
11
11
hostprogs-$(CONFIG_LOGO) += pnmtologo
12
12
hostprogs-$(CONFIG_VT) += conmakehash
13
13
hostprogs-$(CONFIG_IKCONFIG) += bin2c
14
+ hostprogs-$(BUILD_C_RECORDMCOUNT) += recordmcount
14
15
15
16
always := $(hostprogs-y ) $(hostprogs-m )
16
17
Original file line number Diff line number Diff line change @@ -209,12 +209,16 @@ cmd_modversions = \
209
209
endif
210
210
211
211
ifdef CONFIG_FTRACE_MCOUNT_RECORD
212
+ ifdef BUILD_C_RECORDMCOUNT
213
+ cmd_record_mcount = $(srctree)/scripts/recordmcount "$(@)";
214
+ else
212
215
cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \
213
216
"$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \
214
217
"$(if $(CONFIG_64BIT),64,32)" \
215
218
"$(OBJDUMP)" "$(OBJCOPY)" "$(CC)" "$(LD)" "$(NM)" "$(RM)" "$(MV)" \
216
219
"$(if $(part-of-module),1,0)" "$(@)";
217
220
endif
221
+ endif
218
222
219
223
define rule_cc_o_c
220
224
$(call echo-cmd,checksrc) $(cmd_checksrc) \
You can’t perform that action at this time.
0 commit comments