1 /* 2 * Copyright (C) 2015-2017 Alibaba Group Holding Limited 3 */ 4 5 #ifndef K_STATS_H 6 #define K_STATS_H 7 8 #ifdef __cplusplus 9 extern "C" { 10 #endif 11 12 /** @addtogroup aos_rhino stats 13 * OS statistic 14 * 15 * @{ 16 */ 17 18 #if (RHINO_CONFIG_KOBJ_LIST > 0) 19 /** 20 * Init statistic list. 21 * 22 * @param[in] NULL 23 * 24 * @return NULL 25 */ 26 void kobj_list_init(void); 27 #endif 28 29 #if (RHINO_CONFIG_TASK_STACK_OVF_CHECK > 0) 30 /** 31 * Check task stack overflow. 32 * 33 * @param[in] NULL 34 * 35 * @return NULL 36 */ 37 void krhino_stack_ovf_check(void); 38 #endif 39 40 #if (RHINO_CONFIG_SYS_STATS > 0) 41 /** 42 * Reset task schedule statistic data. 43 * 44 * @param[in] NULL 45 * 46 * @return NULL 47 */ 48 void krhino_task_sched_stats_reset(void); 49 50 /** 51 * Record task schedule statistic data. 52 * 53 * @param[in] NULL 54 * 55 * @return NULL 56 */ 57 void krhino_task_sched_stats_get(void); 58 #endif 59 60 #if (RHINO_CONFIG_HW_COUNT > 0) 61 /** 62 * Record measurement overhead. 63 * 64 * @param[in] NULL 65 * 66 * @return NULL 67 */ 68 void krhino_overhead_measure(void); 69 #endif 70 71 #if (RHINO_CONFIG_CPU_USAGE_STATS > 0) 72 uint32_t krhino_get_cpu_usage(void); 73 #endif 74 75 /** @} */ 76 77 #ifdef __cplusplus 78 } 79 #endif 80 81 #endif /* K_STATS_H */ 82 83