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/ftrace.c b/ldelf/ftrace.c
index 2da68ef..4aa1116 100644
--- a/ldelf/ftrace.c
+++ b/ldelf/ftrace.c
@@ -57,6 +57,8 @@
fbuf->buf_off = fbuf->head_off + count;
fbuf->curr_size = 0;
fbuf->max_size = fbuf_size - sizeof(struct ftrace_buf) - count;
+ fbuf->syscall_trace_enabled = false;
+ fbuf->syscall_trace_suspended = false;
*fbuf_ptr = fbuf;