anchao commented on a change in pull request #5689: URL: https://github.com/apache/incubator-nuttx/pull/5689#discussion_r821283125
########## File path: drivers/segger/note_sysview.c ########## @@ -189,6 +202,82 @@ static bool sysview_isenabled_irq(int irq, bool enter) if ((g_sysview.mode.flag & NOTE_FILTER_MODE_FLAG_IRQ) == 0 || NOTE_FILTER_IRQMASK_ISSET(irq, &g_sysview.irq_mask)) { +#ifdef CONFIG_SMP + int cpu = this_cpu(); +#else + int cpu = 0; +#endif + + if (enter) + { + g_sysview.irq_nest[cpu]++; + } + else + { + g_sysview.irq_nest[cpu]--; + } + + return false; + } +#endif + + return true; +} +#endif + +/**************************************************************************** + * Name: sysview_isenabled_syscall + * + * Description: + * Check whether the syscall instrumentation is enabled. + * + * Input Parameters: + * nr - syscall number + * + * Returned Value: + * True is returned if the instrumentation is enabled. + * + ****************************************************************************/ + +#ifdef CONFIG_SCHED_INSTRUMENTATION_SYSCALL +static inline int sysview_isenabled_syscall(int nr) +{ +#ifdef CONFIG_SCHED_INSTRUMENTATION_FILTER + if (!sysview_isenabled()) + { + return false; + } + + /* Exclude the case of syscall called by the interrupt handler which is + * not traced. + */ + + if (up_interrupt_context()) Review comment: Done, removed -- 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