mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-21 10:36:04 +08:00
[debug] remove RT_DEBUG_xxx
remove RT_DEBUG_THREAD RT_DEBUG_SCHEDULER RT_DEBUG_IPC RT_DEBUG_TIMER RT_DEBUG_IRQ RT_DEBUG_MEM RT_DEBUG_SLAB RT_DEBUG_MEMHEAP
This commit is contained in:
committed by
Man, Jianting (Meco)
parent
3660db39a1
commit
237bbfd968
-36
@@ -211,48 +211,12 @@ if RT_DEBUG
|
||||
bool "Enable debugging of components initialization"
|
||||
default n
|
||||
|
||||
config RT_DEBUG_THREAD
|
||||
bool "Enable debugging of Thread State Changes"
|
||||
default n
|
||||
|
||||
config RT_DEBUG_SCHEDULER
|
||||
bool "Enable debugging of Scheduler"
|
||||
default n
|
||||
|
||||
config RT_DEBUG_IPC
|
||||
bool "Enable debugging of IPC"
|
||||
default n
|
||||
|
||||
config RT_DEBUG_TIMER
|
||||
bool "Enable debugging of Timer"
|
||||
default n
|
||||
|
||||
config RT_DEBUG_IRQ
|
||||
bool "Enable debugging of IRQ(Interrupt Request)"
|
||||
default n
|
||||
|
||||
config RT_DEBUG_MEM
|
||||
bool "Enable debugging of Small Memory Algorithm"
|
||||
default n
|
||||
|
||||
config RT_DEBUG_SLAB
|
||||
bool "Enable debugging of SLAB Memory Algorithm"
|
||||
default n
|
||||
|
||||
config RT_DEBUG_MEMHEAP
|
||||
bool "Enable debugging of Memory Heap Algorithm"
|
||||
default n
|
||||
|
||||
if ARCH_MM_MMU
|
||||
config RT_DEBUG_PAGE_LEAK
|
||||
bool "Enable page leaking tracer"
|
||||
default n
|
||||
endif
|
||||
|
||||
config RT_DEBUG_MODULE
|
||||
bool "Enable debugging of Application Module"
|
||||
default n
|
||||
|
||||
endif
|
||||
|
||||
menu "Inter-Thread communication"
|
||||
|
||||
@@ -51,11 +51,7 @@
|
||||
#include <rthw.h>
|
||||
|
||||
#define DBG_TAG "kernel.ipc"
|
||||
#ifdef RT_DEBUG_IPC
|
||||
#define DBG_LVL DBG_LOG
|
||||
#else
|
||||
#define DBG_LVL DBG_WARNING
|
||||
#endif /* defined (RT_DEBUG_IPC) */
|
||||
#define DBG_LVL DBG_INFO
|
||||
#include <rtdbg.h>
|
||||
|
||||
#ifndef __on_rt_object_trytake_hook
|
||||
|
||||
@@ -18,11 +18,7 @@
|
||||
#include <rtthread.h>
|
||||
|
||||
#define DBG_TAG "kernel.irq"
|
||||
#ifdef RT_DEBUG_IRQ
|
||||
#define DBG_LVL DBG_LOG
|
||||
#else
|
||||
#define DBG_LVL DBG_WARNING
|
||||
#endif /* defined (RT_DEBUG_IRQ) */
|
||||
#define DBG_LVL DBG_INFO
|
||||
#include <rtdbg.h>
|
||||
|
||||
#ifndef __on_rt_interrupt_enter_hook
|
||||
|
||||
@@ -51,16 +51,9 @@
|
||||
#include <rtthread.h>
|
||||
|
||||
#if defined (RT_USING_SMALL_MEM)
|
||||
/**
|
||||
* memory item on the small mem
|
||||
*/
|
||||
|
||||
#define DBG_TAG "kernel.mem"
|
||||
#ifdef RT_DEBUG_MEM
|
||||
#define DBG_LVL DBG_LOG
|
||||
#else
|
||||
#define DBG_LVL DBG_WARNING
|
||||
#endif /* defined (RT_DEBUG_MEM) */
|
||||
#define DBG_LVL DBG_INFO
|
||||
#include <rtdbg.h>
|
||||
|
||||
struct rt_small_mem_item
|
||||
|
||||
+1
-5
@@ -27,11 +27,7 @@
|
||||
#ifdef RT_USING_MEMHEAP
|
||||
|
||||
#define DBG_TAG "kernel.memheap"
|
||||
#ifdef RT_DEBUG_MEMHEAP
|
||||
#define DBG_LVL DBG_LOG
|
||||
#else
|
||||
#define DBG_LVL DBG_WARNING
|
||||
#endif /* defined (RT_DEBUG_MEM) */
|
||||
#define DBG_LVL DBG_INFO
|
||||
#include <rtdbg.h>
|
||||
|
||||
/* dynamic pool magic and mask */
|
||||
|
||||
+1
-5
@@ -35,11 +35,7 @@
|
||||
#include <rthw.h>
|
||||
|
||||
#define DBG_TAG "kernel.scheduler"
|
||||
#ifdef RT_DEBUG_SCHEDULER
|
||||
#define DBG_LVL DBG_LOG
|
||||
#else
|
||||
#define DBG_LVL DBG_WARNING
|
||||
#endif /* defined (RT_DEBUG_SCHEDULER) */
|
||||
#define DBG_LVL DBG_INFO
|
||||
#include <rtdbg.h>
|
||||
|
||||
rt_list_t rt_thread_priority_table[RT_THREAD_PRIORITY_MAX];
|
||||
|
||||
+1
-5
@@ -35,11 +35,7 @@
|
||||
#include <rthw.h>
|
||||
|
||||
#define DBG_TAG "kernel.scheduler"
|
||||
#ifdef RT_DEBUG_SCHEDULER
|
||||
#define DBG_LVL DBG_LOG
|
||||
#else
|
||||
#define DBG_LVL DBG_WARNING
|
||||
#endif /* defined (RT_DEBUG_SCHEDULER) */
|
||||
#define DBG_LVL DBG_INFO
|
||||
#include <rtdbg.h>
|
||||
|
||||
rt_list_t rt_thread_priority_table[RT_THREAD_PRIORITY_MAX];
|
||||
|
||||
+5
-9
@@ -55,14 +55,10 @@
|
||||
#include <rthw.h>
|
||||
#include <rtthread.h>
|
||||
|
||||
#if defined (RT_USING_SLAB)
|
||||
#ifdef RT_USING_SLAB
|
||||
|
||||
#define DBG_TAG "kernel.slab"
|
||||
#ifdef RT_DEBUG_SLAB
|
||||
#define DBG_LVL DBG_LOG
|
||||
#else
|
||||
#define DBG_LVL DBG_WARNING
|
||||
#endif /* defined (RT_DEBUG_SLAB) */
|
||||
#define DBG_LVL DBG_INFO
|
||||
#include <rtdbg.h>
|
||||
|
||||
/*
|
||||
@@ -751,7 +747,7 @@ void rt_slab_free(rt_slab_t m, void *ptr)
|
||||
return ;
|
||||
|
||||
/* get memory usage */
|
||||
#ifdef RT_DEBUG_SLAB
|
||||
#if (DBG_LVL == DBG_LOG)
|
||||
{
|
||||
rt_ubase_t addr = ((rt_ubase_t)ptr & ~RT_MM_PAGE_MASK);
|
||||
LOG_D("free a memory 0x%x and align to 0x%x, kup index %d",
|
||||
@@ -759,7 +755,7 @@ void rt_slab_free(rt_slab_t m, void *ptr)
|
||||
(rt_ubase_t)addr,
|
||||
((rt_ubase_t)(addr) - slab->heap_start) >> RT_MM_PAGE_BITS);
|
||||
}
|
||||
#endif /* RT_DEBUG_SLAB */
|
||||
#endif /* DBG_LVL == DBG_LOG */
|
||||
|
||||
kup = btokup((rt_ubase_t)ptr & ~RT_MM_PAGE_MASK);
|
||||
/* release large allocation */
|
||||
@@ -857,4 +853,4 @@ void rt_slab_free(rt_slab_t m, void *ptr)
|
||||
}
|
||||
RTM_EXPORT(rt_slab_free);
|
||||
|
||||
#endif /* defined (RT_USING_SLAB) */
|
||||
#endif /* RT_USING_SLAB */
|
||||
|
||||
+1
-5
@@ -39,11 +39,7 @@
|
||||
#include <stddef.h>
|
||||
|
||||
#define DBG_TAG "kernel.thread"
|
||||
#ifdef RT_DEBUG_THREAD
|
||||
#define DBG_LVL DBG_LOG
|
||||
#else
|
||||
#define DBG_LVL DBG_WARNING
|
||||
#endif /* defined (RT_DEBUG_THREAD) */
|
||||
#define DBG_LVL DBG_INFO
|
||||
#include <rtdbg.h>
|
||||
|
||||
#ifndef __on_rt_thread_inited_hook
|
||||
|
||||
+3
-7
@@ -25,11 +25,7 @@
|
||||
#include <rthw.h>
|
||||
|
||||
#define DBG_TAG "kernel.timer"
|
||||
#ifdef RT_DEBUG_TIMER
|
||||
#define DBG_LVL DBG_LOG
|
||||
#else
|
||||
#define DBG_LVL DBG_WARNING
|
||||
#endif /* defined (RT_DEBUG_TIMER) */
|
||||
#define DBG_LVL DBG_INFO
|
||||
#include <rtdbg.h>
|
||||
|
||||
/* hard timer list */
|
||||
@@ -203,7 +199,7 @@ rt_inline void _timer_remove(rt_timer_t timer)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef RT_DEBUG_TIMER
|
||||
#if (DBG_LVL == DBG_LOG)
|
||||
/**
|
||||
* @brief The number of timer
|
||||
*
|
||||
@@ -242,7 +238,7 @@ void rt_timer_dump(rt_list_t timer_heads[])
|
||||
}
|
||||
rt_kprintf("\n");
|
||||
}
|
||||
#endif /* RT_DEBUG_TIMER */
|
||||
#endif /* (DBG_LVL == DBG_LOG) */
|
||||
|
||||
/**
|
||||
* @addtogroup Clock
|
||||
|
||||
Reference in New Issue
Block a user