drivers/segger: add heap data plot

Add heap current used to note.
Plot it in segger sysview data plot.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
This commit is contained in:
xuxingliang 2024-08-28 10:06:52 +08:00 committed by Xiang Xiao
parent b3cc564910
commit 18d5ae20f5
15 changed files with 100 additions and 122 deletions

View file

@ -186,7 +186,7 @@ static void mm_delayfree(struct mm_heap_s *heap, void *mem, bool delay)
int size = host_mallocsize(mem); int size = host_mallocsize(mem);
atomic_fetch_sub(&heap->aordblks, 1); atomic_fetch_sub(&heap->aordblks, 1);
atomic_fetch_sub(&heap->uordblks, size); atomic_fetch_sub(&heap->uordblks, size);
sched_note_heap(NOTE_HEAP_FREE, heap, mem, size); sched_note_heap(NOTE_HEAP_FREE, heap, mem, size, 0);
host_free(mem); host_free(mem);
} }
} }
@ -230,7 +230,7 @@ struct mm_heap_s *mm_initialize(const char *name,
procfs_register_meminfo(&heap->mm_procfs); procfs_register_meminfo(&heap->mm_procfs);
#endif #endif
sched_note_heap(NOTE_HEAP_ADD, heap, heap_start, heap_size); sched_note_heap(NOTE_HEAP_ADD, heap, heap_start, heap_size, 0);
return heap; return heap;
} }
@ -252,9 +252,7 @@ struct mm_heap_s *mm_initialize(const char *name,
void mm_uninitialize(struct mm_heap_s *heap) void mm_uninitialize(struct mm_heap_s *heap)
{ {
sched_note_heap(NOTE_HEAP_REMOVE, heap, heap_start, sched_note_heap(NOTE_HEAP_REMOVE, heap, NULL, 0, 0);
(uintptr_t)heap->mm_heapend[0] -
(uintptr_t)heap->mm_heapstart[0]);
#if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_MEMINFO) #if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_MEMINFO)
procfs_unregister_meminfo(&heap->mm_procfs); procfs_unregister_meminfo(&heap->mm_procfs);
@ -393,10 +391,10 @@ void *mm_realloc(struct mm_heap_s *heap, void *oldmem,
{ {
if (oldmem != NULL) if (oldmem != NULL)
{ {
sched_note_heap(NOTE_HEAP_FREE, heap, oldmem, oldsize); sched_note_heap(NOTE_HEAP_FREE, heap, oldmem, oldsize, 0);
} }
sched_note_heap(NOTE_HEAP_ALLOC, heap, mem, newsize); sched_note_heap(NOTE_HEAP_ALLOC, heap, mem, newsize, 0);
} }
do do
@ -488,7 +486,7 @@ void *mm_memalign(struct mm_heap_s *heap, size_t alignment, size_t size)
} }
size = host_mallocsize(mem); size = host_mallocsize(mem);
sched_note_heap(NOTE_HEAP_ALLOC, heap, mem, size); sched_note_heap(NOTE_HEAP_ALLOC, heap, mem, size, 0);
atomic_fetch_add(&heap->aordblks, 1); atomic_fetch_add(&heap->aordblks, 1);
atomic_fetch_add(&heap->uordblks, size); atomic_fetch_add(&heap->uordblks, size);
usmblks = atomic_load(&heap->usmblks); usmblks = atomic_load(&heap->usmblks);

View file

@ -38,6 +38,7 @@ CONFIG_RAM_START=0x20000000
CONFIG_RAW_BINARY=y CONFIG_RAW_BINARY=y
CONFIG_RR_INTERVAL=200 CONFIG_RR_INTERVAL=200
CONFIG_SCHED_INSTRUMENTATION=y CONFIG_SCHED_INSTRUMENTATION=y
CONFIG_SCHED_INSTRUMENTATION_HEAP=y
CONFIG_SCHED_INSTRUMENTATION_IRQHANDLER=y CONFIG_SCHED_INSTRUMENTATION_IRQHANDLER=y
CONFIG_SCHED_INSTRUMENTATION_SWITCH=y CONFIG_SCHED_INSTRUMENTATION_SWITCH=y
CONFIG_SEGGER_SYSVIEW=y CONFIG_SEGGER_SYSVIEW=y

View file

@ -92,8 +92,8 @@
#define note_irqhandler(drv, irq, handler, enter) \ #define note_irqhandler(drv, irq, handler, enter) \
((drv)->ops->irqhandler && \ ((drv)->ops->irqhandler && \
((drv)->ops->irqhandler(drv, irq, handler, enter), true)) ((drv)->ops->irqhandler(drv, irq, handler, enter), true))
#define note_heap(drv, alloc, data, mem, size) \ #define note_heap(drv, event, data, mem, size, used) \
((drv)->ops->heap && ((drv)->ops->heap(drv, alloc, data, mem, size), true)) ((drv)->ops->heap && ((drv)->ops->heap(drv, event, data, mem, size, used), true))
#define note_string(drv, ip, buf) \ #define note_string(drv, ip, buf) \
((drv)->ops->string && ((drv)->ops->string(drv, ip, buf), true)) ((drv)->ops->string && ((drv)->ops->string(drv, ip, buf), true))
#define note_event(drv, ip, event, buf, len) \ #define note_event(drv, ip, event, buf, len) \
@ -1356,7 +1356,7 @@ void sched_note_irqhandler(int irq, FAR void *handler, bool enter)
#ifdef CONFIG_SCHED_INSTRUMENTATION_HEAP #ifdef CONFIG_SCHED_INSTRUMENTATION_HEAP
void sched_note_heap(uint8_t event, FAR void *heap, FAR void *mem, void sched_note_heap(uint8_t event, FAR void *heap, FAR void *mem,
size_t size) size_t size, size_t used)
{ {
FAR struct note_driver_s **driver; FAR struct note_driver_s **driver;
struct note_heap_s note; struct note_heap_s note;
@ -1372,7 +1372,7 @@ void sched_note_heap(uint8_t event, FAR void *heap, FAR void *mem,
for (driver = g_note_drivers; *driver; driver++) for (driver = g_note_drivers; *driver; driver++)
{ {
if (note_heap(*driver, event, heap, mem, size)) if (note_heap(*driver, event, heap, mem, size, used))
{ {
continue; continue;
} }
@ -1389,6 +1389,7 @@ void sched_note_heap(uint8_t event, FAR void *heap, FAR void *mem,
note.heap = heap; note.heap = heap;
note.mem = mem; note.mem = mem;
note.size = size; note.size = size;
note.used = used;
} }
/* Add the note to circular buffer */ /* Add the note to circular buffer */

View file

@ -98,17 +98,9 @@ struct noteram_dump_cpu_context_s
uint8_t next_priority; /* Task Priority of the next line */ uint8_t next_priority; /* Task Priority of the next line */
}; };
struct noteram_dump_task_context_s
{
FAR struct noteram_dump_task_context_s *next;
pid_t pid;
size_t mm_used;
};
struct noteram_dump_context_s struct noteram_dump_context_s
{ {
struct noteram_dump_cpu_context_s cpu[NCPUS]; struct noteram_dump_cpu_context_s cpu[NCPUS];
struct noteram_dump_task_context_s *task;
}; };
/**************************************************************************** /****************************************************************************
@ -429,13 +421,6 @@ int noteram_close(FAR struct file *filep)
{ {
FAR struct noteram_dump_context_s *ctx = filep->f_priv; FAR struct noteram_dump_context_s *ctx = filep->f_priv;
while (ctx->task != NULL)
{
FAR struct noteram_dump_task_context_s *task = ctx->task;
ctx->task = task->next;
kmm_free(task);
}
kmm_free(ctx); kmm_free(ctx);
return OK; return OK;
} }
@ -638,60 +623,7 @@ static void noteram_dump_init_context(FAR struct noteram_dump_context_s *ctx)
} }
/**************************************************************************** /****************************************************************************
* Name: noteram_dump_find_task_context * Name: get_taskname
****************************************************************************/
#ifdef CONFIG_SCHED_INSTRUMENTATION_HEAP
static FAR struct noteram_dump_task_context_s *
noteram_dump_find_task_context(FAR struct noteram_dump_context_s *ctx,
pid_t pid)
{
FAR struct noteram_dump_task_context_s *task;
FAR struct noteram_dump_task_context_s *prev;
if (ctx->task == NULL)
{
ctx->task = kmm_zalloc(sizeof(*ctx->task));
if (ctx->task == NULL)
{
return NULL;
}
ctx->task->pid = pid;
ctx->task->next = NULL;
return ctx->task;
}
else
{
task = ctx->task;
}
while (task != NULL)
{
if (task->pid == pid)
{
return task;
}
prev = task;
task = task->next;
}
prev->next = kmm_zalloc(sizeof(*prev));
if (prev->next == NULL)
{
return NULL;
}
task = prev->next;
task->pid = pid;
task->next = NULL;
return task;
}
#endif
/****************************************************************************
* Name: get_task_name
****************************************************************************/ ****************************************************************************/
static const char *get_taskname(pid_t pid) static const char *get_taskname(pid_t pid)
@ -1094,26 +1026,16 @@ static int noteram_dump_one(FAR uint8_t *p, FAR struct lib_outstream_s *s,
case NOTE_HEAP_FREE: case NOTE_HEAP_FREE:
{ {
FAR struct note_heap_s *nmm = (FAR struct note_heap_s *)p; FAR struct note_heap_s *nmm = (FAR struct note_heap_s *)p;
FAR struct noteram_dump_task_context_s *tctx;
int used = 0;
FAR const char *name[] = FAR const char *name[] =
{ {
"add", "remove", "malloc", "free" "add", "remove", "malloc", "free"
}; };
tctx = noteram_dump_find_task_context(ctx, pid);
if (tctx != NULL)
{
tctx->mm_used += note->nc_type == NOTE_HEAP_FREE ? -nmm->size
: note->nc_type == NOTE_HEAP_ALLOC ? nmm->size
: 0;
used = tctx->mm_used;
}
ret += noteram_dump_header(s, &nmm->nmm_cmn, ctx); ret += noteram_dump_header(s, &nmm->nmm_cmn, ctx);
ret += lib_sprintf(s, "tracing_mark_write: C|%d|Heap Usage|%d|%s" ret += lib_sprintf(s, "tracing_mark_write: C|%d|Heap Usage|%d|%s"
": heap: %p size:%" PRIiPTR ", address: %p\n", ": heap: %p size:%" PRIiPTR ", address: %p\n",
pid, used, name[note->nc_type - NOTE_HEAP_ADD], pid, nmm->used,
name[note->nc_type - NOTE_HEAP_ADD],
nmm->heap, nmm->size, nmm->mem); nmm->heap, nmm->size, nmm->mem);
} }
break; break;

View file

@ -23,6 +23,7 @@
****************************************************************************/ ****************************************************************************/
#include <stddef.h> #include <stddef.h>
#include <stdio.h>
#include <syslog.h> #include <syslog.h>
#include <nuttx/clock.h> #include <nuttx/clock.h>
@ -76,7 +77,7 @@ static void note_sysview_syscall_leave(FAR struct note_driver_s *drv,
#ifdef CONFIG_SCHED_INSTRUMENTATION_HEAP #ifdef CONFIG_SCHED_INSTRUMENTATION_HEAP
static void note_sysview_heap(FAR struct note_driver_s *drv, static void note_sysview_heap(FAR struct note_driver_s *drv,
uint8_t event, FAR void *heap, FAR void *mem, uint8_t event, FAR void *heap, FAR void *mem,
size_t size); size_t size, size_t curused);
#endif #endif
/**************************************************************************** /****************************************************************************
@ -330,19 +331,55 @@ static void note_sysview_syscall_leave(FAR struct note_driver_s *drv,
#ifdef CONFIG_SCHED_INSTRUMENTATION_HEAP #ifdef CONFIG_SCHED_INSTRUMENTATION_HEAP
static void note_sysview_heap(FAR struct note_driver_s *drv, static void note_sysview_heap(FAR struct note_driver_s *drv,
uint8_t event, FAR void *heap, FAR void *mem, uint8_t event, FAR void *heap, FAR void *mem,
size_t size) size_t size, size_t curused)
{ {
switch (event) switch (event)
{ {
case NOTE_HEAP_ALLOC: case NOTE_HEAP_ALLOC:
SEGGER_SYSVIEW_HeapAlloc(heap, mem, size);
break;
case NOTE_HEAP_FREE: case NOTE_HEAP_FREE:
{
U32 value = (U32)curused;
const SEGGER_SYSVIEW_DATA_SAMPLE data =
{
.ID = (U32)(uintptr_t)heap,
.pU32_Value = &value,
};
SEGGER_SYSVIEW_SampleData(&data);
if (event == NOTE_HEAP_ALLOC)
{
SEGGER_SYSVIEW_HeapAlloc(heap, mem, size);
}
else
{
SEGGER_SYSVIEW_HeapFree(heap, mem); SEGGER_SYSVIEW_HeapFree(heap, mem);
}
break; break;
}
case NOTE_HEAP_ADD: case NOTE_HEAP_ADD:
{
char name[32];
SEGGER_SYSVIEW_DATA_REGISTER data =
{
.ID = (U32)(uintptr_t)heap,
.DataType = SEGGER_SYSVIEW_TYPE_U32,
.Offset = 0,
.RangeMin = 0,
.RangeMax = 0,
.ScalingFactor = 1.f,
.sUnit = "B",
.sName = name,
};
snprintf(name, sizeof(name), "Heap%p", heap);
SEGGER_SYSVIEW_RegisterData(&data);
SEGGER_SYSVIEW_HeapDefine(heap, mem, size, 0); SEGGER_SYSVIEW_HeapDefine(heap, mem, size, 0);
break; break;
}
default: default:
break; break;
} }

View file

@ -93,7 +93,8 @@ struct note_driver_ops_s
#endif #endif
#ifdef CONFIG_SCHED_INSTRUMENTATION_HEAP #ifdef CONFIG_SCHED_INSTRUMENTATION_HEAP
CODE void (*heap)(FAR struct note_driver_s *drv, uint8_t event, CODE void (*heap)(FAR struct note_driver_s *drv, uint8_t event,
FAR void *heap, FAR void *mem, size_t size); FAR void *heap, FAR void *mem, size_t size,
size_t curused);
#endif #endif
#ifdef CONFIG_SCHED_INSTRUMENTATION_DUMP #ifdef CONFIG_SCHED_INSTRUMENTATION_DUMP
CODE void (*string)(FAR struct note_driver_s *drv, uintptr_t ip, CODE void (*string)(FAR struct note_driver_s *drv, uintptr_t ip,

View file

@ -392,6 +392,7 @@ struct note_heap_s
FAR void *heap; FAR void *heap;
FAR void *mem; FAR void *mem;
size_t size; size_t size;
size_t used;
}; };
struct note_string_s struct note_string_s
@ -558,9 +559,9 @@ void sched_note_irqhandler(int irq, FAR void *handler, bool enter);
#ifdef CONFIG_SCHED_INSTRUMENTATION_HEAP #ifdef CONFIG_SCHED_INSTRUMENTATION_HEAP
void sched_note_heap(uint8_t event, FAR void *heap, FAR void *mem, void sched_note_heap(uint8_t event, FAR void *heap, FAR void *mem,
size_t size); size_t size, size_t used);
#else #else
# define sched_note_heap(e,h,m,s) # define sched_note_heap(e,h,m,s,c)
#endif #endif
#ifdef CONFIG_SCHED_INSTRUMENTATION_DUMP #ifdef CONFIG_SCHED_INSTRUMENTATION_DUMP

View file

@ -128,7 +128,7 @@ void mm_delayfree(FAR struct mm_heap_s *heap, FAR void *mem, bool delay)
/* Update heap statistics */ /* Update heap statistics */
heap->mm_curused -= nodesize; heap->mm_curused -= nodesize;
sched_note_heap(NOTE_HEAP_FREE, heap, mem, nodesize); sched_note_heap(NOTE_HEAP_FREE, heap, mem, nodesize, heap->mm_curused);
/* Check if the following node is free and, if so, merge it */ /* Check if the following node is free and, if so, merge it */

View file

@ -204,7 +204,8 @@ void mm_addregion(FAR struct mm_heap_s *heap, FAR void *heapstart,
heap->mm_curused += 2 * MM_SIZEOF_ALLOCNODE; heap->mm_curused += 2 * MM_SIZEOF_ALLOCNODE;
mm_unlock(heap); mm_unlock(heap);
sched_note_heap(NOTE_HEAP_ADD, heap, heapstart, heapsize); sched_note_heap(NOTE_HEAP_ADD, heap, heapstart, heapsize,
heap->mm_curused);
} }
/**************************************************************************** /****************************************************************************
@ -372,7 +373,7 @@ void mm_uninitialize(FAR struct mm_heap_s *heap)
kasan_unregister(heap->mm_heapstart[i]); kasan_unregister(heap->mm_heapstart[i]);
sched_note_heap(NOTE_HEAP_REMOVE, heap, heap->mm_heapstart[i], sched_note_heap(NOTE_HEAP_REMOVE, heap, heap->mm_heapstart[i],
(uintptr_t)heap->mm_heapend[i] - (uintptr_t)heap->mm_heapend[i] -
(uintptr_t)heap->mm_heapstart[i]); (uintptr_t)heap->mm_heapstart[i], heap->mm_curused);
} }
#if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_MEMINFO) #if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_MEMINFO)

View file

@ -327,7 +327,8 @@ FAR void *mm_malloc(FAR struct mm_heap_s *heap, size_t size)
{ {
MM_ADD_BACKTRACE(heap, node); MM_ADD_BACKTRACE(heap, node);
ret = kasan_unpoison(ret, nodesize - MM_ALLOCNODE_OVERHEAD); ret = kasan_unpoison(ret, nodesize - MM_ALLOCNODE_OVERHEAD);
sched_note_heap(NOTE_HEAP_ALLOC, heap, ret, nodesize); sched_note_heap(NOTE_HEAP_ALLOC, heap, ret, nodesize,
heap->mm_curused);
#ifdef CONFIG_MM_FILL_ALLOCATIONS #ifdef CONFIG_MM_FILL_ALLOCATIONS
memset(ret, MM_ALLOC_MAGIC, alignsize - MM_ALLOCNODE_OVERHEAD); memset(ret, MM_ALLOC_MAGIC, alignsize - MM_ALLOCNODE_OVERHEAD);
#endif #endif

View file

@ -281,7 +281,8 @@ FAR void *mm_memalign(FAR struct mm_heap_s *heap, size_t alignment,
alignedchunk = (uintptr_t)kasan_unpoison((FAR const void *)alignedchunk, alignedchunk = (uintptr_t)kasan_unpoison((FAR const void *)alignedchunk,
size - MM_ALLOCNODE_OVERHEAD); size - MM_ALLOCNODE_OVERHEAD);
sched_note_heap(NOTE_HEAP_ALLOC, heap, (FAR void *)alignedchunk, size); sched_note_heap(NOTE_HEAP_ALLOC, heap, (FAR void *)alignedchunk, size,
heap->mm_curused);
DEBUGASSERT(alignedchunk % alignment == 0); DEBUGASSERT(alignedchunk % alignment == 0);
return (FAR void *)alignedchunk; return (FAR void *)alignedchunk;

View file

@ -383,8 +383,10 @@ FAR void *mm_realloc(FAR struct mm_heap_s *heap, FAR void *oldmem,
heap->mm_maxused = heap->mm_curused; heap->mm_maxused = heap->mm_curused;
} }
sched_note_heap(NOTE_HEAP_FREE, heap, oldmem, oldsize); sched_note_heap(NOTE_HEAP_FREE, heap, oldmem, oldsize,
sched_note_heap(NOTE_HEAP_ALLOC, heap, newmem, newsize); heap->mm_curused - newsize);
sched_note_heap(NOTE_HEAP_ALLOC, heap, newmem, newsize,
heap->mm_curused);
mm_unlock(heap); mm_unlock(heap);
MM_ADD_BACKTRACE(heap, (FAR char *)newmem - MM_SIZEOF_ALLOCNODE); MM_ADD_BACKTRACE(heap, (FAR char *)newmem - MM_SIZEOF_ALLOCNODE);

View file

@ -511,7 +511,7 @@ static void mm_delayfree(FAR struct mm_heap_s *heap, FAR void *mem,
/* Update heap statistics */ /* Update heap statistics */
heap->mm_curused -= size; heap->mm_curused -= size;
sched_note_heap(NOTE_HEAP_FREE, heap, mem, size); sched_note_heap(NOTE_HEAP_FREE, heap, mem, size, heap->mm_curused);
tlsf_free(heap->mm_tlsf, mem); tlsf_free(heap->mm_tlsf, mem);
} }
@ -601,7 +601,8 @@ void mm_addregion(FAR struct mm_heap_s *heap, FAR void *heapstart,
tlsf_add_pool(heap->mm_tlsf, heapstart, heapsize); tlsf_add_pool(heap->mm_tlsf, heapstart, heapsize);
mm_unlock(heap); mm_unlock(heap);
sched_note_heap(NOTE_HEAP_ADD, heap, heapstart, heapsize); sched_note_heap(NOTE_HEAP_ADD, heap, heapstart, heapsize,
heap->mm_curused);
} }
/**************************************************************************** /****************************************************************************
@ -1191,7 +1192,8 @@ FAR void *mm_malloc(FAR struct mm_heap_s *heap, size_t size)
#endif #endif
ret = kasan_unpoison(ret, nodesize); ret = kasan_unpoison(ret, nodesize);
sched_note_heap(NOTE_HEAP_ALLOC, heap, ret, nodesize); sched_note_heap(NOTE_HEAP_ALLOC, heap, ret, nodesize,
heap->mm_curused);
#ifdef CONFIG_MM_FILL_ALLOCATIONS #ifdef CONFIG_MM_FILL_ALLOCATIONS
memset(ret, 0xaa, nodesize); memset(ret, 0xaa, nodesize);
@ -1271,7 +1273,8 @@ FAR void *mm_memalign(FAR struct mm_heap_s *heap, size_t alignment,
memdump_backtrace(heap, buf); memdump_backtrace(heap, buf);
#endif #endif
ret = kasan_unpoison(ret, nodesize); ret = kasan_unpoison(ret, nodesize);
sched_note_heap(NOTE_HEAP_ALLOC, heap, ret, nodesize); sched_note_heap(NOTE_HEAP_ALLOC, heap, ret, nodesize,
heap->mm_curused);
} }
#if CONFIG_MM_FREE_DELAYCOUNT_MAX > 0 #if CONFIG_MM_FREE_DELAYCOUNT_MAX > 0
@ -1399,8 +1402,10 @@ FAR void *mm_realloc(FAR struct mm_heap_s *heap, FAR void *oldmem,
memdump_backtrace(heap, buf); memdump_backtrace(heap, buf);
#endif #endif
sched_note_heap(NOTE_HEAP_FREE, heap, oldmem, oldsize); sched_note_heap(NOTE_HEAP_FREE, heap, oldmem, oldsize,
sched_note_heap(NOTE_HEAP_ALLOC, heap, newmem, newsize); heap->mm_curused - newsize);
sched_note_heap(NOTE_HEAP_ALLOC, heap, newmem, newsize,
heap->mm_curused);
} }
#if CONFIG_MM_FREE_DELAYCOUNT_MAX > 0 #if CONFIG_MM_FREE_DELAYCOUNT_MAX > 0
@ -1443,7 +1448,7 @@ void mm_uninitialize(FAR struct mm_heap_s *heap)
kasan_unregister(heap->mm_heapstart[i]); kasan_unregister(heap->mm_heapstart[i]);
sched_note_heap(NOTE_HEAP_REMOVE, heap, heap->mm_heapstart[i], sched_note_heap(NOTE_HEAP_REMOVE, heap, heap->mm_heapstart[i],
(uintptr_t)heap->mm_heapend[i] - (uintptr_t)heap->mm_heapend[i] -
(uintptr_t)heap->mm_heapstart[i]); (uintptr_t)heap->mm_heapstart[i], heap->mm_curused);
} }
#if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_MEMINFO) #if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_MEMINFO)

View file

@ -1290,7 +1290,7 @@ config SCHED_INSTRUMENTATION_HEAP
---help--- ---help---
Enables additional hooks for heap allocation. Enables additional hooks for heap allocation.
void sched_note_heap(uint8_t event, FAR void* heap, FAR void *mem, size_t size); void sched_note_heap(uint8_t event, FAR void* heap, FAR void *mem, size_t size, size_t curused);
config SCHED_INSTRUMENTATION_DUMP config SCHED_INSTRUMENTATION_DUMP
bool "Use note dump for instrumentation" bool "Use note dump for instrumentation"

View file

@ -304,12 +304,19 @@ static const char *g_white_content_list[] =
* drivers/segger/note_sysview.c * drivers/segger/note_sysview.c
*/ */
"SEGGER_SYSVIEW", "DataType",
"TaskID", "Offset",
"sName",
"Prio", "Prio",
"pU32_Value",
"RangeMax",
"RangeMin",
"SEGGER_SYSVIEW",
"ScalingFactor",
"sName",
"sUnit",
"StackBase", "StackBase",
"StackSize", "StackSize",
"TaskID",
/* Ref: /* Ref:
* drivers/segger/syslog_rtt.c * drivers/segger/syslog_rtt.c