YuuichiNakamura commented on a change in pull request #2142:
URL: https://github.com/apache/incubator-nuttx/pull/2142#discussion_r514275874



##########
File path: sched/sched/sched_note.c
##########
@@ -405,6 +405,10 @@ void sched_note_start(FAR struct tcb_s *tcb)
   strncpy(note.nsa_name, tcb->name, CONFIG_TASK_NAME_SIZE + 1);
 
   length = SIZEOF_NOTE_START(namelen + 1);
+
+#ifdef CONFIG_SCHED_INSTRUMENTATION_RECORD_TASKNAME
+  sched_note_add_taskname(tcb->pid, tcb->name);

Review comment:
       > 1. add task name to the buffer in NOTE_START
   > 2. remove task name from the buffer in NOTE_STOP
   
   Then, the buffer always keeps the name of currently existing tasks.
   On the other hand, the trace data is the history of the task activities and 
it may contain the task which is already terminated when dumping the trace data.
   The name buffer must have the name of tasks which made any activities while 
getting the trace.
   




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

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


Reply via email to