You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/03/23 14:18:25 UTC
[incubator-nuttx] branch master updated: arch: Show assigned cpu in dump task
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 9cffc10 arch: Show assigned cpu in dump task
9cffc10 is described below
commit 9cffc105c8cb56dae2bd791821cf09aada569559
Author: Huang Qi <hu...@xiaomi.com>
AuthorDate: Wed Mar 23 15:17:02 2022 +0800
arch: Show assigned cpu in dump task
Signed-off-by: Huang Qi <hu...@xiaomi.com>
---
arch/arm/src/common/arm_assert.c | 12 ++++++++++++
arch/risc-v/src/common/riscv_assert.c | 12 ++++++++++++
arch/xtensa/src/common/xtensa_dumpstate.c | 12 ++++++++++++
3 files changed, 36 insertions(+)
diff --git a/arch/arm/src/common/arm_assert.c b/arch/arm/src/common/arm_assert.c
index e3da777..ee63061 100644
--- a/arch/arm/src/common/arm_assert.c
+++ b/arch/arm/src/common/arm_assert.c
@@ -165,6 +165,9 @@ static void arm_dump_task(FAR struct tcb_s *tcb, FAR void *arg)
/* Dump interesting properties of this task */
_alert(" %4d %4d"
+#ifdef CONFIG_SMP
+ " %4d"
+#endif
#ifdef CONFIG_STACK_COLORATION
" %7lu"
#endif
@@ -180,6 +183,9 @@ static void arm_dump_task(FAR struct tcb_s *tcb, FAR void *arg)
#endif
"\n",
tcb->pid, tcb->sched_priority,
+#ifdef CONFIG_SMP
+ tcb->cpu,
+#endif
#ifdef CONFIG_STACK_COLORATION
(unsigned long)up_check_tcbstack(tcb),
#endif
@@ -234,6 +240,9 @@ static void arm_showtasks(void)
/* Dump interesting properties of each task in the crash environment */
_alert(" PID PRI"
+#ifdef CONFIG_SMP
+ " CPU"
+#endif
#ifdef CONFIG_STACK_COLORATION
" USED"
#endif
@@ -251,6 +260,9 @@ static void arm_showtasks(void)
#if CONFIG_ARCH_INTERRUPTSTACK > 7
_alert(" ---- ----"
+# ifdef CONFIG_SMP
+ " ----"
+# endif
# ifdef CONFIG_STACK_COLORATION
" %7lu"
# endif
diff --git a/arch/risc-v/src/common/riscv_assert.c b/arch/risc-v/src/common/riscv_assert.c
index d0c0416..25e4b4b 100644
--- a/arch/risc-v/src/common/riscv_assert.c
+++ b/arch/risc-v/src/common/riscv_assert.c
@@ -175,6 +175,9 @@ static void riscv_dump_task(struct tcb_s *tcb, void *arg)
/* Dump interesting properties of this task */
_alert(" %4d %4d"
+#ifdef CONFIG_SMP
+ " %4d"
+#endif
#ifdef CONFIG_STACK_COLORATION
" %7lu"
#endif
@@ -190,6 +193,9 @@ static void riscv_dump_task(struct tcb_s *tcb, void *arg)
#endif
"\n",
tcb->pid, tcb->sched_priority,
+#ifdef CONFIG_SMP
+ tcb->cpu,
+#endif
#ifdef CONFIG_STACK_COLORATION
(unsigned long)up_check_tcbstack(tcb),
#endif
@@ -244,6 +250,9 @@ static inline void riscv_showtasks(void)
/* Dump interesting properties of each task in the crash environment */
_alert(" PID PRI"
+#ifdef CONFIG_SMP
+ " CPU"
+#endif
#ifdef CONFIG_STACK_COLORATION
" USED"
#endif
@@ -261,6 +270,9 @@ static inline void riscv_showtasks(void)
#if CONFIG_ARCH_INTERRUPTSTACK > 15
_alert(" ---- ----"
+# ifdef CONFIG_SMP
+ " ----"
+# endif
# ifdef CONFIG_STACK_COLORATION
" %7lu"
# endif
diff --git a/arch/xtensa/src/common/xtensa_dumpstate.c b/arch/xtensa/src/common/xtensa_dumpstate.c
index f5869f5..1b9e59f 100644
--- a/arch/xtensa/src/common/xtensa_dumpstate.c
+++ b/arch/xtensa/src/common/xtensa_dumpstate.c
@@ -90,6 +90,9 @@ static void xtensa_dump_task(struct tcb_s *tcb, void *arg)
/* Dump interesting properties of this task */
_alert(" %4d %4d"
+#ifdef CONFIG_SMP
+ " %4d"
+#endif
#ifdef CONFIG_STACK_COLORATION
" %7lu"
#endif
@@ -105,6 +108,9 @@ static void xtensa_dump_task(struct tcb_s *tcb, void *arg)
#endif
"\n",
tcb->pid, tcb->sched_priority,
+#ifdef CONFIG_SMP
+ tcb->cpu,
+#endif
#ifdef CONFIG_STACK_COLORATION
(unsigned long)up_check_tcbstack(tcb),
#endif
@@ -159,6 +165,9 @@ static inline void xtensa_showtasks(void)
/* Dump interesting properties of each task in the crash environment */
_alert(" PID PRI"
+#ifdef CONFIG_SMP
+ " CPU"
+#endif
#ifdef CONFIG_STACK_COLORATION
" USED"
#endif
@@ -176,6 +185,9 @@ static inline void xtensa_showtasks(void)
#if CONFIG_ARCH_INTERRUPTSTACK > 15
_alert(" ---- ----"
+# ifdef CONFIG_SMP
+ " ----"
+# endif
# ifdef CONFIG_STACK_COLORATION
" %7lu"
# endif