anchao commented on a change in pull request #5689: URL: https://github.com/apache/incubator-nuttx/pull/5689#discussion_r821282854
########## File path: drivers/segger/note_sysview.c ########## @@ -310,6 +399,42 @@ void sched_note_irqhandler(int irq, FAR void *handler, bool enter) } #endif +#ifdef CONFIG_SCHED_INSTRUMENTATION_SYSCALL +void sched_note_syscall_enter(int nr, int argc, ...) +{ + if (sysview_isenabled_syscall(nr) == 0) + { + return; + } + + if (NOTE_FILTER_SYSCALLMASK_ISSET(nr, &g_sysview.syscall_active) == 0) + { + SEGGER_SYSVIEW_NameMarker(nr, g_funcnames[nr]); + NOTE_FILTER_SYSCALLMASK_SET(nr, &g_sysview.syscall_active); + + if (NOTE_FILTER_SYSCALLMASK_ISSET(0, &g_sysview.syscall_active) == 0) Review comment: Use the Syscall "0" to identify whether the syscall is enabled, if the host tool is closed abnormally, use this bit to clear the active set. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org