File tree Expand file tree Collapse file tree
utility/execution_profile_kit Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -340,7 +340,10 @@ typedef unsigned short USHORT;
340340#define TX_THREAD_EXTENSION_2
341341
342342/* Execution profile related */
343- #define TX_THREAD_EXTENSION_3
343+ #define TX_THREAD_EXTENSION_3 \
344+ unsigned long long tx_thread_execution_time_total; \
345+ unsigned long tx_thread_execution_time_last_start;
346+
344347
345348/* Define the port extensions of the remaining ThreadX objects. */
346349
Original file line number Diff line number Diff line change 4040#include "tx_thread.h"
4141
4242#ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
43- #include "tx_execution_profile.h"
43+ #include "../../utility/execution_profile_kit/ tx_execution_profile.h"
4444#endif
4545
4646
Original file line number Diff line number Diff line change @@ -56,9 +56,15 @@ typedef unsigned long EXECUTION_TIME_SOURCE_TYPE;
5656
5757/* Define basic constants for the execution profile kit. */
5858
59- /* Example for Cortex-M targets: */
59+ /* Xtensa target definition */
6060#ifndef TX_EXECUTION_TIME_SOURCE
61- #define TX_EXECUTION_TIME_SOURCE (EXECUTION_TIME_SOURCE_TYPE) *((volatile ULONG *) 0xE0001004)
61+ #include <xtensa/config/core.h>
62+ #if XCHAL_HAVE_CCOUNT
63+ #include <xtensa/tie/xt_timer.h>
64+ #define TX_EXECUTION_TIME_SOURCE (EXECUTION_TIME_SOURCE_TYPE) XT_RSR_CCOUNT()
65+ #else
66+ #define TX_EXECUTION_TIME_SOURCE 0
67+ #endif
6268#endif
6369#ifndef TX_EXECUTION_MAX_TIME_SOURCE
6470#define TX_EXECUTION_MAX_TIME_SOURCE 0xFFFFFFFF
You can’t perform that action at this time.
0 commit comments