riscv : select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
PATCH RESEND 1/1 riscv : select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
riscv now uses -fpatchable-function-entry with dynamic ftrace after the afc76b8b8 commit, which means recordmcount shouldn't be called to create the __mcount_loc section before the vmlinux linking.
We should select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY to tell Makefile not to run recordmcount.
--- arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/riscv/Kconfig +1 -0
@@ -246,6 +246,7 @@ config ARCH_RV64I select HAVE_DYNAMIC_FTRACE if !XIP_KERNEL && MMU && $(cc-option,-fpatchable-function-entry=8) select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL + select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if DYNAMIC_FTRACE select HAVE_FUNCTION_GRAPH_TRACER select HAVE_FUNCTION_TRACER if !XIP_KERNEL select SWIOTLB if MMU
Signature · 7 lines
2.20.1 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 8 lines · Song Shuai <[email protected]> 于2022年9月23日周五 10:03写道:
riscv now uses -fpatchable-function-entry with dynamic ftrace after the
afc76b8b8commit, which means recordmcount shouldn't be called to create the__mcount_locsection before the vmlinux linking.We should select
FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRYto tellMakefilenot to run recordmcount.
Hi,Guo:
Can this patch squeeze into your v3 series ?
Thanks,
Song
Quoted 20 lines
Signed-off-by Song Shuai <[email protected]>--- arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/riscv/Kconfig +1
-1@@ -246,6 +246,7 @@ config ARCH_RV64I select HAVE_DYNAMIC_FTRACE if !XIP_KERNEL && MMU && $(cc-option,-fpatchable-function-entry=8) select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL + select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if DYNAMIC_FTRACE select HAVE_FUNCTION_GRAPH_TRACER select HAVE_FUNCTION_TRACER if !XIP_KERNEL select SWIOTLB if MMU --2.20.1
Guo Ren
Tested-byQuoted 5 lines · Song Shuai
Quoted 3 lines · Song Shuai <[email protected]> 于2022年9月23日周五 10:03写道:
riscv now uses -fpatchable-function-entry with dynamic ftrace after the
afc76b8b8commit, which means recordmcount shouldn't be called
The ref commit format needs to be corrected. Others:
Quoted 8 lines
Quoted 5 lines
to create the
__mcount_locsection before the vmlinux linking.We should select
FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRYto tellMakefilenot to run recordmcount.Hi,Guo:
Can this patch squeeze into your v3 series ?
They don't have a dependency, and it's unnecessary. A single patch is easy for the maintainer to pick up.
Quoted 23 lines
Thanks,
SongQuoted 20 lines
Signed-off-by Song Shuai <[email protected]>--- arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/riscv/Kconfig +1
-1@@ -246,6 +246,7 @@ config ARCH_RV64I select HAVE_DYNAMIC_FTRACE if !XIP_KERNEL && MMU && $(cc-option,-fpatchable-function-entry=8) select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL + select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if DYNAMIC_FTRACE select HAVE_FUNCTION_GRAPH_TRACER select HAVE_FUNCTION_TRACER if !XIP_KERNEL select SWIOTLB if MMU --2.20.1
Signature · 7 lines
Best Regards Guo Ren _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 10 lines · Guo Ren <[email protected]> 于2022年11月28日周一 21:47写道:
Quoted 5 lines · Song Shuai
Quoted 3 lines · Song Shuai <[email protected]> 于2022年9月23日周五 10:03写道:
riscv now uses -fpatchable-function-entry with dynamic ftrace after the
afc76b8b8commit, which means recordmcount shouldn't be calledThe ref commit format needs to be corrected. Others:
Tested-by Guo Ren <[email protected]>
Thanks for your test.
I'll correct this ref in the next version.
Quoted 11 lines
Quoted 8 lines
Quoted 5 lines
to create the
__mcount_locsection before the vmlinux linking.We should select
FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRYto tellMakefilenot to run recordmcount.Hi,Guo:
Can this patch squeeze into your v3 series ?
They don't have a dependency, and it's unnecessary. A single patch is easy for the maintainer to pick up.
Got it.
Quoted 29 lines
Quoted 8 lines
Thanks,
SongQuoted 5 lines
Signed-off-by Song Shuai <[email protected]>--- arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+)Quoted 15 lines
Quoted 13 lines
arch/riscv/Kconfig +1
-1@@ -246,6 +246,7 @@ config ARCH_RV64I select HAVE_DYNAMIC_FTRACE if !XIP_KERNEL && MMU && $(cc-option,-fpatchable-function-entry=8) select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL + select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if DYNAMIC_FTRACE select HAVE_FUNCTION_GRAPH_TRACER select HAVE_FUNCTION_TRACER if !XIP_KERNEL select SWIOTLB if MMU --Quoted 2 lines
2.20.1
--
Best Regards
Guo Ren
Signature · 2 lines
Thanks, Song