kernel: Swap RUNTIME_STATS implementation
Clean up RUNTIME_STATS to separate the API from the individual data backends. Use the SCHED_THREAD_USAGE tracking instead of the original for execution_cycles. Move the kconfig for that into the runtime stats menu, since it's part of the family now. Also remove a lot of needless #if's around the declarations. Unused structs and uncalled functions don't need to be explicitly hidden. An attempt to access a non-existent field (e.g. "execution_cycles" if that isn't configured) provides all the build time validation we need. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
52351458f4
commit
f169c5bc13
5 changed files with 31 additions and 111 deletions
|
@ -21,10 +21,6 @@
|
|||
#include <toolchain.h>
|
||||
#include <tracing/tracing_macros.h>
|
||||
|
||||
#ifdef CONFIG_THREAD_RUNTIME_STATS_USE_TIMING_FUNCTIONS
|
||||
#include <timing/timing.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -5874,8 +5870,6 @@ __syscall int k_float_disable(struct k_thread *thread);
|
|||
*/
|
||||
__syscall int k_float_enable(struct k_thread *thread, unsigned int options);
|
||||
|
||||
#ifdef CONFIG_THREAD_RUNTIME_STATS
|
||||
|
||||
/**
|
||||
* @brief Get the runtime statistics of a thread
|
||||
*
|
||||
|
@ -5894,8 +5888,6 @@ int k_thread_runtime_stats_get(k_tid_t thread,
|
|||
*/
|
||||
int k_thread_runtime_stats_all_get(k_thread_runtime_stats_t *stats);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue