mm/memdump: dynamic turn on backtrace in heap when enable DEBUG_MM

default turn off.
turn on: echo on > /proc/memdump
turn off: echo off > proc/memdump

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
Jiuzhu Dong
2022-03-27 13:21:48 +08:00
committed by Xiang Xiao
parent 42664f4505
commit 709207b8d3
7 changed files with 49 additions and 12 deletions
+8
View File
@@ -133,6 +133,14 @@ struct procfs_meminfo_entry_s
FAR const char *name;
FAR struct mm_heap_s *heap;
struct procfs_meminfo_entry_s *next;
#if defined(CONFIG_DEBUG_MM)
/* This is dynamic control flag whether to turn on backtrace in the heap,
* you can set it by /proc/memdump.
*/
bool backtrace;
#endif
};
/****************************************************************************