kernel/sched: Add an optional "all" counter for thread_usage
Tally the runtime of all non-idle threads. Make it optional via kconfig to avoid overhead. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
4ae3250301
commit
b62d6e17a4
3 changed files with 27 additions and 2 deletions
|
@ -172,6 +172,10 @@ struct z_kernel {
|
|||
#if defined(CONFIG_THREAD_MONITOR)
|
||||
struct k_thread *threads; /* singly linked list of ALL threads */
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SCHED_THREAD_USAGE_ALL
|
||||
uint64_t all_thread_usage;
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef struct z_kernel _kernel_t;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue