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 2021/07/29 02:53:46 UTC

[GitHub] [incubator-nuttx] a-lunev opened a new pull request #4250: sched/wqueue: added debug option to tag and print worker name

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


   ## Summary
   
   sched/wqueue: added debug option to tag and print worker name to the informational debug output.
   This may be useful e.g. to identify a hung up worker that stalled the whole queue of the other workers.
   
   ## Impact
   
   sched/wqueue


-- 
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-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] SunJun8 edited a comment on pull request #4250: sched/wqueue: added debug option to tag and print worker name

Posted by GitBox <gi...@apache.org>.
SunJun8 edited a comment on pull request #4250:
URL: https://github.com/apache/incubator-nuttx/pull/4250#issuecomment-906849810


   > > @a-lunev Binary dependency libraries related to bl602 have been removed
   > > @xiaoxiang781216 The work of removing dependencies will be done later,and resubmit after adjusting the compatibility
   > 
   > Hi @SunJun8
   > Please let me know when the work of removing dependencies is planned to finish?
   
   Still in progress, planned to be completed within a week
   


-- 
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-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] a-lunev commented on a change in pull request #4250: sched/wqueue: added debug option to tag and print worker name

Posted by GitBox <gi...@apache.org>.
a-lunev commented on a change in pull request #4250:
URL: https://github.com/apache/incubator-nuttx/pull/4250#discussion_r679451946



##########
File path: include/nuttx/wqueue.h
##########
@@ -356,8 +359,17 @@ int work_usrstart(void);
  *
  ****************************************************************************/
 
-int work_queue(int qid, FAR struct work_s *work, worker_t worker,
-               FAR void *arg, clock_t delay);
+#if defined(CONFIG_LIB_USRWORK) && !defined(__KERNEL__)
+  int work_queue(int qid, FAR struct work_s *work, worker_t worker,
+                 FAR void *arg, clock_t delay);
+#else
+  int work_queue_nt(int qid, FAR struct work_s *work, worker_t worker,
+                    FAR void *arg, clock_t delay, FAR const char *name_tag);
+
+/* Stringificate the worker name for debug purposes */

Review comment:
       Thank you. You are right.




-- 
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-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] a-lunev commented on pull request #4250: sched/wqueue: added debug option to tag and print worker name

Posted by GitBox <gi...@apache.org>.
a-lunev commented on pull request #4250:
URL: https://github.com/apache/incubator-nuttx/pull/4250#issuecomment-906856939


   Good. Thanks.


-- 
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-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] a-lunev commented on pull request #4250: sched/wqueue: added debug option to tag and print worker name

Posted by GitBox <gi...@apache.org>.
a-lunev commented on pull request #4250:
URL: https://github.com/apache/incubator-nuttx/pull/4250#issuecomment-906833575


   > @a-lunev Binary dependency libraries related to bl602 have been removed
   > @xiaoxiang781216 The work of removing dependencies will be done later,and resubmit after adjusting the compatibility
   
   Hi @SunJun8
   Please let me know when the work of removing dependencies is planned to finish?


-- 
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-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] SunJun8 commented on pull request #4250: sched/wqueue: added debug option to tag and print worker name

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


   > > Still in progress, planned to be completed within a week
   > 
   > Hi @SunJun8,
   > 
   > Please let me know is it already completed?
   
   hi, it's completed


-- 
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-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] a-lunev commented on a change in pull request #4250: sched/wqueue: added debug option to tag and print worker name

Posted by GitBox <gi...@apache.org>.
a-lunev commented on a change in pull request #4250:
URL: https://github.com/apache/incubator-nuttx/pull/4250#discussion_r678930304



##########
File path: sched/wqueue/kwork_thread.c
##########
@@ -161,7 +170,15 @@ static int work_thread(int argc, FAR char *argv[])
            */
 
           leave_critical_section(flags);
+
+#ifdef CONFIG_WQUEUE_TAG_WORKER_NAME
+          sinfo("WORKER %s started\n", name_tag);
+#endif
           CALL_WORKER(worker, arg);

Review comment:
       Printing worker name is useful if the full debug log is analyzed what was happening, to analyze how all workers alternate to each other (the whole picture). If just worker addresses printed, it would be necessary to translate each address occurrences using System.map or addr2line, thus the full log not easily readable.




-- 
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-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] a-lunev commented on a change in pull request #4250: sched/wqueue: added debug option to tag and print worker name

Posted by GitBox <gi...@apache.org>.
a-lunev commented on a change in pull request #4250:
URL: https://github.com/apache/incubator-nuttx/pull/4250#discussion_r678930304



##########
File path: sched/wqueue/kwork_thread.c
##########
@@ -161,7 +170,15 @@ static int work_thread(int argc, FAR char *argv[])
            */
 
           leave_critical_section(flags);
+
+#ifdef CONFIG_WQUEUE_TAG_WORKER_NAME
+          sinfo("WORKER %s started\n", name_tag);
+#endif
           CALL_WORKER(worker, arg);

Review comment:
       Printing worker name is useful if the full debug log is analyzed what was happening, to analyze how all workers alternate to each other, including the all other debug messages (the whole picture). If just worker addresses printed, it would be necessary to translate each address occurrences using System.map or addr2line, thus the full log not easily readable.




-- 
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-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] a-lunev commented on pull request #4250: sched/wqueue: added debug option to tag and print worker name

Posted by GitBox <gi...@apache.org>.
a-lunev commented on pull request #4250:
URL: https://github.com/apache/incubator-nuttx/pull/4250#issuecomment-1046222742


   > Still in progress, planned to be completed within a week
   
   Hi @SunJun8,
   
   Please let me know is it already completed?


-- 
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-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #4250: sched/wqueue: added debug option to tag and print worker name

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #4250:
URL: https://github.com/apache/incubator-nuttx/pull/4250#discussion_r678788080



##########
File path: sched/wqueue/kwork_thread.c
##########
@@ -161,7 +170,15 @@ static int work_thread(int argc, FAR char *argv[])
            */
 
           leave_critical_section(flags);
+
+#ifdef CONFIG_WQUEUE_TAG_WORKER_NAME
+          sinfo("WORKER %s started\n", name_tag);
+#endif
           CALL_WORKER(worker, arg);

Review comment:
       Is it enough to print worker address? we can get the function name from address with any methods(e.g. System.map, addr2line, gdb).




-- 
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-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] a-lunev commented on a change in pull request #4250: sched/wqueue: added debug option to tag and print worker name

Posted by GitBox <gi...@apache.org>.
a-lunev commented on a change in pull request #4250:
URL: https://github.com/apache/incubator-nuttx/pull/4250#discussion_r678930304



##########
File path: sched/wqueue/kwork_thread.c
##########
@@ -161,7 +170,15 @@ static int work_thread(int argc, FAR char *argv[])
            */
 
           leave_critical_section(flags);
+
+#ifdef CONFIG_WQUEUE_TAG_WORKER_NAME
+          sinfo("WORKER %s started\n", name_tag);
+#endif
           CALL_WORKER(worker, arg);

Review comment:
       Printing worker name is useful if the full debug log is analyzed what was happening, to analyze how all workers alternate to each other, including the all other debug messages (the whole picture). If just worker addresses printed, it would be necessary to translate each address occurrence using System.map or addr2line, thus the full log not easily readable.




-- 
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-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4250: sched/wqueue: added debug option to tag and print worker name

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #4250:
URL: https://github.com/apache/incubator-nuttx/pull/4250#discussion_r679416146



##########
File path: include/nuttx/wqueue.h
##########
@@ -356,8 +359,17 @@ int work_usrstart(void);
  *
  ****************************************************************************/
 
-int work_queue(int qid, FAR struct work_s *work, worker_t worker,
-               FAR void *arg, clock_t delay);
+#if defined(CONFIG_LIB_USRWORK) && !defined(__KERNEL__)
+  int work_queue(int qid, FAR struct work_s *work, worker_t worker,
+                 FAR void *arg, clock_t delay);
+#else
+  int work_queue_nt(int qid, FAR struct work_s *work, worker_t worker,
+                    FAR void *arg, clock_t delay, FAR const char *name_tag);
+
+/* Stringificate the worker name for debug purposes */

Review comment:
       ```suggestion
   /* Stringify the worker name for debug purposes */
   ```
   nit: I think this is the right verb.




-- 
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-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] SunJun8 commented on pull request #4250: sched/wqueue: added debug option to tag and print worker name

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


   @a-lunev Binary dependency libraries related to bl602 have been removed
   @xiaoxiang781216 The work of removing dependencies will be done later,and resubmit after adjusting the compatibility


-- 
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-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4250: sched/wqueue: added debug option to tag and print worker name

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #4250:
URL: https://github.com/apache/incubator-nuttx/pull/4250#discussion_r679417043



##########
File path: include/nuttx/wqueue.h
##########
@@ -356,8 +359,17 @@ int work_usrstart(void);
  *
  ****************************************************************************/
 
-int work_queue(int qid, FAR struct work_s *work, worker_t worker,
-               FAR void *arg, clock_t delay);
+#if defined(CONFIG_LIB_USRWORK) && !defined(__KERNEL__)
+  int work_queue(int qid, FAR struct work_s *work, worker_t worker,
+                 FAR void *arg, clock_t delay);
+#else
+  int work_queue_nt(int qid, FAR struct work_s *work, worker_t worker,
+                    FAR void *arg, clock_t delay, FAR const char *name_tag);
+
+/* Stringificate the worker name for debug purposes */
+
+#  define work_queue(qid, work, worker, arg, delay) work_queue_nt(qid, work, worker, arg, delay, #worker)

Review comment:
       ```suggestion
   #  define work_queue(qid, work, worker, arg, delay) \
                        work_queue_nt(qid, work, worker, arg, delay, #worker)
   ```
   Line break to no exceed the 78 chars line limit.

##########
File path: include/nuttx/wqueue.h
##########
@@ -356,8 +359,17 @@ int work_usrstart(void);
  *
  ****************************************************************************/
 
-int work_queue(int qid, FAR struct work_s *work, worker_t worker,
-               FAR void *arg, clock_t delay);
+#if defined(CONFIG_LIB_USRWORK) && !defined(__KERNEL__)
+  int work_queue(int qid, FAR struct work_s *work, worker_t worker,
+                 FAR void *arg, clock_t delay);
+#else
+  int work_queue_nt(int qid, FAR struct work_s *work, worker_t worker,
+                    FAR void *arg, clock_t delay, FAR const char *name_tag);
+
+/* Stringificate the worker name for debug purposes */
+
+#  define work_queue(qid, work, worker, arg, delay) work_queue_nt(qid, work, worker, arg, delay, #worker)

Review comment:
       ```suggestion
   #  define work_queue(qid, work, worker, arg, delay) \
                        work_queue_nt(qid, work, worker, arg, delay, #worker)
   ```
   Line break to not exceed the 78 chars line limit.




-- 
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-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] a-lunev commented on pull request #4250: sched/wqueue: added debug option to tag and print worker name

Posted by GitBox <gi...@apache.org>.
a-lunev commented on pull request #4250:
URL: https://github.com/apache/incubator-nuttx/pull/4250#issuecomment-1047726229


   > hi, it's completed
   
   Thank you.


-- 
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-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] a-lunev commented on a change in pull request #4250: sched/wqueue: added debug option to tag and print worker name

Posted by GitBox <gi...@apache.org>.
a-lunev commented on a change in pull request #4250:
URL: https://github.com/apache/incubator-nuttx/pull/4250#discussion_r679452390



##########
File path: include/nuttx/wqueue.h
##########
@@ -356,8 +359,17 @@ int work_usrstart(void);
  *
  ****************************************************************************/
 
-int work_queue(int qid, FAR struct work_s *work, worker_t worker,
-               FAR void *arg, clock_t delay);
+#if defined(CONFIG_LIB_USRWORK) && !defined(__KERNEL__)
+  int work_queue(int qid, FAR struct work_s *work, worker_t worker,
+                 FAR void *arg, clock_t delay);
+#else
+  int work_queue_nt(int qid, FAR struct work_s *work, worker_t worker,
+                    FAR void *arg, clock_t delay, FAR const char *name_tag);
+
+/* Stringificate the worker name for debug purposes */
+
+#  define work_queue(qid, work, worker, arg, delay) work_queue_nt(qid, work, worker, arg, delay, #worker)

Review comment:
       Good. Thanks.




-- 
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-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] SunJun8 commented on pull request #4250: sched/wqueue: added debug option to tag and print worker name

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


   > > @a-lunev Binary dependency libraries related to bl602 have been removed
   > > @xiaoxiang781216 The work of removing dependencies will be done later,and resubmit after adjusting the compatibility
   > 
   > Hi @SunJun8
   > Please let me know when the work of removing dependencies is planned to finish?
   Still in progress, planned to be completed within a week
   


-- 
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-unsubscribe@nuttx.apache.org

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