mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 13:27:01 +08:00
procmeminfo:support memdump can show specific task for tlsf
Signed-off-by: anjiahao <anjiahao@xiaomi.com> Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
+8
-1
@@ -38,6 +38,7 @@
|
||||
#include <nuttx/fs/procfs.h>
|
||||
#include <nuttx/mutex.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
#include <nuttx/sched.h>
|
||||
#include <nuttx/mm/mempool.h>
|
||||
|
||||
#include "tlsf/tlsf.h"
|
||||
@@ -144,9 +145,15 @@ struct memdump_backtrace_s
|
||||
static void memdump_backtrace(FAR struct mm_heap_s *heap,
|
||||
FAR struct memdump_backtrace_s *dump)
|
||||
{
|
||||
# if CONFIG_MM_BACKTRACE > 0
|
||||
FAR struct tcb_s *tcb;
|
||||
# endif
|
||||
|
||||
dump->pid = getpid();
|
||||
# if CONFIG_MM_BACKTRACE > 0
|
||||
if (heap->mm_procfs.backtrace)
|
||||
tcb = nxsched_get_tcb(dump->pid);
|
||||
if (heap->mm_procfs.backtrace ||
|
||||
(tcb && tcb->flags & TCB_FLAG_HEAPDUMP))
|
||||
{
|
||||
int ret = backtrace(dump->backtrace, CONFIG_MM_BACKTRACE);
|
||||
while (ret < CONFIG_MM_BACKTRACE)
|
||||
|
||||
Reference in New Issue
Block a user