xiaoxiang781216 commented on code in PR #1695:
URL: https://github.com/apache/nuttx-apps/pull/1695#discussion_r1155120456


##########
system/trace/trace_dump.c:
##########
@@ -616,6 +632,34 @@ static int trace_dump_one(trace_dump_t type, FAR FILE 
*out, FAR uint8_t *p,
         break;
 #endif
 
+#ifdef CONFIG_SCHED_INSTRUMENTATION_CSECTION
+      case NOTE_CSECTION_ENTER:
+      case NOTE_CSECTION_LEAVE:
+        {
+          struct note_csection_s *ncs;
+          ncs = (FAR struct note_csection_s *)p;
+          trace_dump_header(out, &ncs->ncs_cmn, ctx);
+          fprintf(out, "tracing_mark_write: %c|%d|critical_section\n",

Review Comment:
   should we output the linux kernel format too?



##########
system/trace/trace_dump.c:
##########
@@ -616,6 +632,34 @@ static int trace_dump_one(trace_dump_t type, FAR FILE 
*out, FAR uint8_t *p,
         break;
 #endif
 
+#ifdef CONFIG_SCHED_INSTRUMENTATION_CSECTION
+      case NOTE_CSECTION_ENTER:
+      case NOTE_CSECTION_LEAVE:
+        {
+          struct note_csection_s *ncs;
+          ncs = (FAR struct note_csection_s *)p;
+          trace_dump_header(out, &ncs->ncs_cmn, ctx);
+          fprintf(out, "tracing_mark_write: %c|%d|critical_section\n",
+                  note->nc_type == NOTE_CSECTION_ENTER ? 'B': 'E', pid);
+        }
+        break;
+#endif
+
+#ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION
+      case NOTE_PREEMPT_LOCK:
+      case NOTE_PREEMPT_UNLOCK:
+        {
+          struct note_preempt_s *npr;
+          int16_t count;
+          npr = (FAR struct note_preempt_s *)p;
+          trace_dump_unflatten(&count, npr->npr_count, sizeof(count));
+          trace_dump_header(out, &npr->npr_cmn, ctx);
+          fprintf(out, "tracing_mark_write: %c|%d|sched_lock:%d\n",

Review Comment:
   should we output the linux kernel format too?



-- 
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

Reply via email to