kernel/sched: Separate idle from app thread stats in THREAD_USAGE
It turns out that we have a sample (though not a test) that really does want to use "k_thread_runtime_stats_all_get()" to measure system uptime. Instead of breaking this needlessly, separate the accounting for idle and non-idle threads. The legacy API can report their sum, and the more useful value is available via the kernel struct for future analysis. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
904a6c0319
commit
410f911018
3 changed files with 9 additions and 3 deletions
|
@ -175,6 +175,7 @@ struct z_kernel {
|
|||
|
||||
#ifdef CONFIG_SCHED_THREAD_USAGE_ALL
|
||||
uint64_t all_thread_usage;
|
||||
uint64_t idle_thread_usage;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue