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



##########
File path: include/nuttx/sched.h
##########
@@ -748,6 +748,10 @@ struct tcb_s
 #if CONFIG_TASK_NAME_SIZE > 0
   char name[CONFIG_TASK_NAME_SIZE + 1];  /* Task name (with NUL terminator)    
 */
 #endif
+
+#ifdef CONFIG_SCHED_INSTRUMENTATION_SYSCALL
+  int syscall_nest;                      /* Syscall nest level */

Review comment:
       @xiaoxiang781216 
   This is a screenshot of tracecompass to compare the case of removing the 
nested syscall (upper) and not removing (lower).
   The real execution time of putenv() is upper one, but when the nested 
syscall is not removed, tracecompass misjudges the end of syscall and displays 
incorrect syscall execution period.
   
   However, I understand your thought that it's very useful to trace the nested 
syscall.
   So I have changed my mind and will propose the alternative idea for it:
   - sched_note.c records the syscall notes as it is.
   - The app code which translates the note record into ftrace text format 
counts the nesting level of syscall and removes the nested syscalls for 
correctly tracecompass display.
   
   Because the note data would be available by not only tracecompass but 
another tools, it would be better to remove the special treatment for 
tracecompass from kernel code.
   How about this idea?
   
   
![tracecompass-fig1](https://user-images.githubusercontent.com/36463524/94888914-890f3900-04b5-11eb-89c3-1e56baa0f2e6.png)
   




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