summaryrefslogtreecommitdiffstats
path: root/scripts/recordmcount.c
diff options
context:
space:
mode:
authorQing Zhang <zhangqing@loongson.cn>2022-12-10 22:40:15 +0800
committerHuacai Chen <chenhuacai@loongson.cn>2022-12-14 08:41:53 +0800
commitdbe3ba3018ec1fc53ea0d0adf0f687f5d438039d (patch)
tree1a17fa2645973a8e0c0efe7ee66f58a23c1939ec /scripts/recordmcount.c
parent9151dde40356880bb445f719f5ebbb1319054d5f (diff)
downloadlinux-dbe3ba3018ec1fc53ea0d0adf0f687f5d438039d.tar.gz
linux-dbe3ba3018ec1fc53ea0d0adf0f687f5d438039d.tar.bz2
linux-dbe3ba3018ec1fc53ea0d0adf0f687f5d438039d.zip
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: Jinyang He <hejinyang@loongson.cn> Signed-off-by: Jinyang He <hejinyang@loongson.cn> Signed-off-by: Qing Zhang <zhangqing@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'scripts/recordmcount.c')
0 files changed, 0 insertions, 0 deletions