ftrace: fixing ftrace functionality issues caused by kernel upgrade. [1/2]
PD#SWPL-158752
Problem:
ftrace functionality issues caused by kernel upgrade.
Solution:
fixing ftrace functionality issues caused by kernel upgrade..
Verify:
N/A
Change-Id: I09dd5502c0766dca0c471bc0627cd0e4ba705aec
Signed-off-by: shijie.xiong <shijie.xiong@amlogic.com>
diff --git a/tasks.c b/tasks.c
index fcc371f..3ef0ec5 100644
--- a/tasks.c
+++ b/tasks.c
@@ -40,6 +40,9 @@
#include "task.h"
#include "timers.h"
#include "stack_macros.h"
+#if CONFIG_FTRACE
+#include "ftrace.h"
+#endif
/* Lint e9021, e961 and e750 are suppressed as a MISRA exception justified
* because the MPU ports require MPU_WRAPPERS_INCLUDED_FROM_API_FILE to be defined
@@ -3040,6 +3043,9 @@
if( ulTotalRunTime > ulTaskSwitchedInTime )
{
pxCurrentTCB->ulRunTimeCounter += ( ulTotalRunTime - ulTaskSwitchedInTime );
+#if CONFIG_FTRACE
+ vTraceSwitchContext((uint32_t)pxCurrentTCB->uxTCBNumber);
+#endif
}
else
{