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



##########
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:
       To resolve the above issue, one method is:
   1.Save task name in NOTE_START
   2.Save task name in NOTE_STOP
   Then we have these combination:
   1.No data lose get task name from NOTE_START
   2.NOTE_START lose, but task doesn't terminate, get the task name from pid
   3.NOTE_START lose and task terminate, but NOTE_STOP not lose, get task name 
from NOTE_STOP
   4.Both NOTE_START and NOTE_STOP lose, the trace buffer shouldn't have any 
info related to this task.




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