You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/02/22 12:42:35 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #5583: sched/note:add switch and dump instrumentation

pkarashchenko commented on a change in pull request #5583:
URL: https://github.com/apache/incubator-nuttx/pull/5583#discussion_r811904223



##########
File path: sched/sched/sched_note.c
##########
@@ -319,6 +355,42 @@ static inline int note_isenabled_irq(int irq, bool enter)
 }
 #endif
 
+/****************************************************************************
+ * Name: note_isenabled_dump
+ *
+ * Description:
+ *   Check whether the dump instrumentation is enabled.
+ *
+ * Input Parameters:
+ *   None
+ *
+ * Returned Value:
+ *   True is returned if the instrumentation is enabled.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_SCHED_INSTRUMENTATION_DUMP
+static inline int note_isenabled_dump(void)
+{
+#ifdef CONFIG_SCHED_INSTRUMENTATION_FILTER
+  if (!note_isenabled())
+    {
+      return false;
+    }
+
+  /* If the dump trace is disabled, do nothing.
+   */
+
+  if (!(g_note_filter.mode.flag & NOTE_FILTER_MODE_FLAG_DUMP))

Review comment:
       ```suggestion
     if ((g_note_filter.mode.flag & NOTE_FILTER_MODE_FLAG_DUMP) == 0)
   ```




-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org