mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-26 06:43:58 +08:00
[debug] 整理debug宏并增加RT_DEBUGING_CONTEXT (#7805)
This commit is contained in:
@@ -27,7 +27,7 @@ INIT_EXPORT(rti_secondary_cpu_end, "7.end");
|
||||
|
||||
void rt_dm_secondary_cpu_init(void)
|
||||
{
|
||||
#if RT_DEBUG_INIT
|
||||
#if RT_DEBUGING_INIT
|
||||
int result;
|
||||
const struct rt_init_desc *desc;
|
||||
|
||||
@@ -45,7 +45,7 @@ void rt_dm_secondary_cpu_init(void)
|
||||
{
|
||||
(*fn_ptr)();
|
||||
}
|
||||
#endif /* RT_DEBUG_INIT */
|
||||
#endif /* RT_DEBUGING_INIT */
|
||||
}
|
||||
#endif /* RT_USING_SMP */
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ static struct rt_mem_obj mm_page_mapper = {
|
||||
.hint_free = hint_free,
|
||||
};
|
||||
|
||||
#ifdef RT_DEBUG_PAGE_LEAK
|
||||
#ifdef RT_DEBUGING_PAGE_LEAK
|
||||
static volatile int enable;
|
||||
static rt_page_t _trace_head;
|
||||
#define TRACE_ALLOC(pg, size) _trace_alloc(pg, __builtin_return_address(0), size)
|
||||
@@ -556,7 +556,7 @@ static void *_do_pages_alloc(rt_uint32_t size_bits, size_t flags)
|
||||
{
|
||||
alloc_buf = page_to_addr(p);
|
||||
|
||||
#ifdef RT_DEBUG_PAGE_LEAK
|
||||
#ifdef RT_DEBUGING_PAGE_LEAK
|
||||
level = rt_hw_interrupt_disable();
|
||||
TRACE_ALLOC(p, size_bits);
|
||||
rt_hw_interrupt_enable(level);
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#define PAGE_ANY_AVAILABLE 0x1ul
|
||||
|
||||
|
||||
#ifdef RT_DEBUG_PAGE_LEAK
|
||||
#ifdef RT_DEBUGING_PAGE_LEAK
|
||||
#define DEBUG_FIELD { \
|
||||
/* trace list */ \
|
||||
struct rt_page *tl_next; \
|
||||
|
||||
Reference in New Issue
Block a user