sched/note: add wdog note for segger sysview
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
parent
46b1c8605a
commit
f3d6119282
@ -79,6 +79,10 @@ 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 curused);
|
size_t size, size_t curused);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CONFIG_SCHED_INSTRUMENTATION_WDOG
|
||||||
|
static void note_sysview_wdog(FAR struct note_driver_s *drv, uint8_t event,
|
||||||
|
FAR void *handler, FAR const void *arg);
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
@ -120,7 +124,7 @@ static const struct note_driver_ops_s g_note_sysview_ops =
|
|||||||
note_sysview_irqhandler, /* irqhandler */
|
note_sysview_irqhandler, /* irqhandler */
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SCHED_INSTRUMENTATION_WDOG
|
#ifdef CONFIG_SCHED_INSTRUMENTATION_WDOG
|
||||||
NULL, /* wdog */
|
note_sysview_wdog, /* wdog */
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SCHED_INSTRUMENTATION_HEAP
|
#ifdef CONFIG_SCHED_INSTRUMENTATION_HEAP
|
||||||
note_sysview_heap, /* heap */
|
note_sysview_heap, /* heap */
|
||||||
@ -389,6 +393,21 @@ static void note_sysview_heap(FAR struct note_driver_s *drv,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_SCHED_INSTRUMENTATION_WDOG
|
||||||
|
static void note_sysview_wdog(FAR struct note_driver_s *drv, uint8_t event,
|
||||||
|
FAR void *handler, FAR const void *arg)
|
||||||
|
{
|
||||||
|
if (event == NOTE_WDOG_ENTER)
|
||||||
|
{
|
||||||
|
SEGGER_SYSVIEW_RecordEnterTimer((uintptr_t)handler);
|
||||||
|
}
|
||||||
|
else if (event == NOTE_WDOG_LEAVE)
|
||||||
|
{
|
||||||
|
SEGGER_SYSVIEW_RecordExitTimer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
Loading…
Reference in New Issue
Block a user