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 2020/10/05 13:00:47 UTC

[GitHub] [incubator-nuttx] YuuichiNakamura opened a new pull request #1936: Add task trace support

YuuichiNakamura opened a new pull request #1936:
URL: https://github.com/apache/incubator-nuttx/pull/1936


   ## Summary
   This PR adds the features used for task trace.
   The task trace is available by using `feature/task-tracer` branch in the following repository.
     https://github.com/YuuichiNakamura/incubator-nuttx-apps.git
   (I'll send PR for apps after merging this PR)
   
   - This is created to merge #1377 into the master branch.
   - The document for this feature will be created later (issue #1882)
   
   ## Impact
   - New kernel configurations are added
      CONFIG_SCHED_INSTRUMENTATION_FILTER,
      CONFIG_SCHED_INSTRUMENTATION_FILTER_DEFAULT_MODE,
      CONFIG_DRIVER_NOTECTL,
      CONFIG_DRIVER_NOTERAM_NOOVERWRITE
   - The following features are added when the corresponding configuration is enabled.
     - note filter support
     - /dev/notectl device to control note filters
     - /dev/note ioctls to clear buffer and change buffering mode for task trace
   
   ## Testing
   Tested by using `feature/task-tracer` branch in the following repository.
     https://github.com/YuuichiNakamura/incubator-nuttx-apps.git
   
   Tested by spresense:nsh by changing the following configurations.
   ```
   CONFIG_DRIVER_NOTE=y
   CONFIG_DRIVER_NOTERAM=y
   CONFIG_DRIVER_NOTECTL=y
   CONFIG_SCHED_INSTRUMENTATION=y
   CONFIG_SCHED_INSTRUMENTATION_FILTER=y
   CONFIG_SCHED_INSTRUMENTATION_IRQHANDLER=y
   CONFIG_SCHED_INSTRUMENTATION_SYSCALL=y
   ```
   `trace` command is added to nsh by this configuration.
   ```
   nsh> trace cmd "usleep 1000"
   nsh> trace dump
   ```
   This can get the following results:
   ```
   <noname>-1   [0]   7.640000000: sys_ioctl -> 0
   <noname>-1   [0]   7.640000000: sys_close()
   <noname>-1   [0]   7.640000000: sys_close -> 0
   <noname>-1   [0]   7.640000000: sys_sched_lock()
   <noname>-1   [0]   7.640000000: sys_sched_lock -> 0
   <noname>-1   [0]   7.640000000: sys_nxsched_get_stackinfo()
   <noname>-1   [0]   7.640000000: sys_nxsched_get_stackinfo -> 0
   <noname>-1   [0]   7.640000000: sys_sched_unlock()
   <noname>-1   [0]   7.640000000: sys_sched_unlock -> 0
   <noname>-1   [0]   7.640000000: sys_clock_nanosleep()
   <noname>-1   [0]   7.640000000: sched_switch: prev_comm=<noname> prev_pid=1 prev_state=S ==> next_comm=<noname> next_pid=0
   <noname>-0   [0]   7.640000000: irq_handler_entry: irq=11
   <noname>-0   [0]   7.640000000: irq_handler_exit: irq=11
   <noname>-0   [0]   7.640000000: irq_handler_entry: irq=15
   <noname>-0   [0]   7.650000000: irq_handler_exit: irq=15
   <noname>-0   [0]   7.650000000: irq_handler_entry: irq=15
   <noname>-0   [0]   7.660000000: sched_waking: comm=<noname> pid=1 target_cpu=0
   <noname>-1   [0]   7.660000000: irq_handler_exit: irq=15
   <noname>-1   [0]   7.660000000: sched_switch: prev_comm=<noname> prev_pid=1 prev_state=R ==> next_comm=<noname> next_pid=1
   <noname>-1   [0]   7.660000000: sys_clock_nanosleep -> 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.

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



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #1936: Add task trace support

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #1936:
URL: https://github.com/apache/incubator-nuttx/pull/1936


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] jerpelea commented on pull request #1936: Add task trace support

Posted by GitBox <gi...@apache.org>.
jerpelea commented on pull request #1936:
URL: https://github.com/apache/incubator-nuttx/pull/1936#issuecomment-703659489


   LGTM


----------------------------------------------------------------
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:
users@infra.apache.org