LoongArch/ftrace: Add basic support
This patch contains basic ftrace support for LoongArch. Specifically, function tracer (HAVE_FUNCTION_TRACER), function graph tracer (HAVE_ FUNCTION_GRAPH_TRACER) are implemented following the instructions in Documentation/trace/ftrace-design.txt. Use `-pg` makes stub like a child function `void _mcount(void *ra)`. Thus, it can be seen store RA and alloc stack before `call _mcount`. Find `alloc stack` at first, and then find `store RA`. Note that the functions in both inst.c and time.c should not be hooked with the compiler's -pg option: to prevent infinite self-referencing for the former, and to ignore early setup stuff for the latter. Co-developed-by: NJinyang He <hejinyang@loongson.cn> Signed-off-by: NJinyang He <hejinyang@loongson.cn> Signed-off-by: NQing Zhang <zhangqing@loongson.cn> Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
Showing
arch/loongarch/kernel/ftrace.c
0 → 100644
arch/loongarch/kernel/mcount.S
0 → 100644
想要评论请 注册 或 登录