mm/heap: add MM_BACKTRACE_DEFAULT to config backtrace record by default
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
709207b8d3
commit
1ab58aff55
2 changed files with 8 additions and 0 deletions
|
@ -186,4 +186,9 @@ config MM_KASAN
|
|||
bugs in native code. After turn on this option, Please
|
||||
add -fsanitize=kernel-address to CFLAGS/CXXFLAGS too.
|
||||
|
||||
config MM_BACKTRACE_DEFAULT
|
||||
bool "Enable the backtrace record by default"
|
||||
default n
|
||||
depends on DEBUG_MM
|
||||
|
||||
source "mm/iob/Kconfig"
|
||||
|
|
|
@ -213,6 +213,9 @@ FAR struct mm_heap_s *mm_initialize(FAR const char *name,
|
|||
#if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
|
||||
heap->mm_procfs.name = name;
|
||||
heap->mm_procfs.heap = heap;
|
||||
#if defined (CONFIG_DEBUG_MM) && defined(CONFIG_MM_BACKTRACE_DEFAULT)
|
||||
heap->mm_procfs.backtrace = true;
|
||||
#endif
|
||||
procfs_register_meminfo(&heap->mm_procfs);
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue