debug

宏定义

#define printk   aos_debug_printf
 

函数

void aos_debug_backtrace_now (int32_t(*print_func)(const char *fmt,...))
 
void aos_debug_backtrace_task (char *taskname, int32_t(*print_func)(const char *fmt,...))
 
void aos_debug_mm_overview (int32_t(*print_func)(const char *fmt,...))
 
void aos_debug_task_overview (int32_t(*print_func)(const char *fmt,...))
 
void aos_debug_buf_queue_overview (int32_t(*print_func)(const char *fmt,...))
 
void aos_debug_queue_overview (int32_t(*print_func)(const char *fmt,...))
 
void aos_debug_sem_overview (int32_t(*print_func)(const char *fmt,...))
 
void aos_debug_mutex_overview (int32_t(*print_func)(const char *fmt,...))
 
void aos_debug_overview (int32_t(*print_func)(const char *fmt,...))
 
void aos_debug_task_cpu_usage_stats (void)
 
int32_t aos_debug_task_cpu_usage_get (char *taskname)
 
uint32_t aos_debug_total_cpu_usage_get (uint32_t cpuid)
 
void aos_debug_total_cpu_usage_show (void)
 
void aos_debug_fatal_error (kstat_t err, char *file, int32_t line)
 
int32_t aos_debug_printf (const char *fmt,...)
 
void aos_debug_init (void)
 

详细描述

宏定义说明

◆ printk

#define printk   aos_debug_printf

在文件 debug.h150 行定义.

函数说明

◆ aos_debug_backtrace_now()

void aos_debug_backtrace_now ( int32_t(*)(const char *fmt,...)  print_func)

Show current contex backtrace

参数
[in]print_funcfunction to output information, NULL for "printf"

@retrun NULL

◆ aos_debug_backtrace_task()

void aos_debug_backtrace_task ( char *  taskname,
int32_t(*)(const char *fmt,...)  print_func 
)

Show task backtrace

参数
[in]tasknamethe task name which is need to be got
[in]print_funcfunction to output information, NULL for "printf"

@retrun NULL

◆ aos_debug_buf_queue_overview()

void aos_debug_buf_queue_overview ( int32_t(*)(const char *fmt,...)  print_func)

Show the overview of buf_queue

参数
[in]print_funcfunction to output information, NULL for "printf"

@retrun NULL

◆ aos_debug_fatal_error()

void aos_debug_fatal_error ( kstat_t  err,
char *  file,
int32_t  line 
)

system assert, called by k_err_proc

参数
[in]errthe kernel err status
[in]filesame as FILE
[in]filesame as line
返回
NULL

◆ aos_debug_init()

void aos_debug_init ( void  )

This function init debug module

返回
NULL

◆ aos_debug_mm_overview()

void aos_debug_mm_overview ( int32_t(*)(const char *fmt,...)  print_func)

Show the overview of memory(heap and pool)

参数
[in]print_funcfunction to output information, NULL for "printf"

@retrun NULL

◆ aos_debug_mutex_overview()

void aos_debug_mutex_overview ( int32_t(*)(const char *fmt,...)  print_func)

Show the overview of mutex

参数
[in]print_funcfunction to output information, NULL for "printf"

@retrun NULL

◆ aos_debug_overview()

void aos_debug_overview ( int32_t(*)(const char *fmt,...)  print_func)

Show the overview of all(task/memory/bufqueue/queue/sem)

参数
[in]print_funcfunction to output information, NULL for "printf"

@retrun NULL

◆ aos_debug_printf()

int32_t aos_debug_printf ( const char *  fmt,
  ... 
)

This function support debug print same as printf

返回
0 is ok, others err

◆ aos_debug_queue_overview()

void aos_debug_queue_overview ( int32_t(*)(const char *fmt,...)  print_func)

Show the overview of queue

参数
[in]print_funcfunction to output information, NULL for "printf"

@retrun NULL

◆ aos_debug_sem_overview()

void aos_debug_sem_overview ( int32_t(*)(const char *fmt,...)  print_func)

Show the overview of sem

参数
[in]print_funcfunction to output information, NULL for "printf"

@retrun NULL

◆ aos_debug_task_cpu_usage_get()

int32_t aos_debug_task_cpu_usage_get ( char *  taskname)

This function will get the cpuusage for the specified task

参数
[in]tasknamethe task name which is need to be got
返回
-1 is error, others is cpuusage, the units are 1/10,000

◆ aos_debug_task_cpu_usage_stats()

void aos_debug_task_cpu_usage_stats ( void  )

This function will statistics the task run time in the previous statistics cycle

返回
NULL

◆ aos_debug_task_overview()

void aos_debug_task_overview ( int32_t(*)(const char *fmt,...)  print_func)

Show the overview of tasks

参数
[in]print_funcfunction to output information, NULL for "printf"

@retrun NULL

◆ aos_debug_total_cpu_usage_get()

uint32_t aos_debug_total_cpu_usage_get ( uint32_t  cpuid)

This function will get the cpuusage for the specified CPU

参数
[in]cpuidthe cpu id to obtain CPU utilization
返回
cpuusage, the units are 1/10,000

◆ aos_debug_total_cpu_usage_show()

void aos_debug_total_cpu_usage_show ( void  )

This function will show the statistics for CPU utilization

返回
NULL