ftrace: Add support for syscall function tracer
This patch adds support for syscall tracing in TEE core. It complements
existing ftrace support for user TAs via adding trace for syscalls that
are invoked by user TAs into the TEE core.
And after this patch ftrace will cover both TA and TEE core code. So lets
rename config option from CFG_TA_FTRACE_SUPPORT to CFG_FTRACE_SUPPORT.
It is optional to enable syscall trace via CFG_SYSCALL_FTRACE=y config
option in addition to CFG_FTRACE_SUPPORT=y config option.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
diff --git a/ldelf/main.c b/ldelf/main.c
index ee4da5c..086917c 100644
--- a/ldelf/main.c
+++ b/ldelf/main.c
@@ -49,7 +49,7 @@
sys_return_cleanup();
}
-#ifdef CFG_TA_FTRACE_SUPPORT
+#ifdef CFG_FTRACE_SUPPORT
struct print_buf_ctx {
char *buf;
size_t blen;
@@ -159,7 +159,7 @@
ta_elf_finalize_load_main(&arg->entry_func);
arg->ftrace_entry = 0;
-#ifdef CFG_TA_FTRACE_SUPPORT
+#ifdef CFG_FTRACE_SUPPORT
if (ftrace_init(&arg->fbuf))
arg->ftrace_entry = (vaddr_t)(void *)ftrace_dump;
#endif