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 2023/08/18 17:42:25 UTC

[nuttx] branch master updated: driver/note: dump irq handler address to trace

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/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 29ddfd44a0 driver/note: dump irq handler address to trace
29ddfd44a0 is described below

commit 29ddfd44a0d2bc05e54361d44c573f32d9f35a59
Author: dongjiuzhu1 <do...@xiaomi.com>
AuthorDate: Tue Jun 20 16:56:24 2023 +0800

    driver/note: dump irq handler address to trace
    
    Signed-off-by: dongjiuzhu1 <do...@xiaomi.com>
---
 drivers/note/note_driver.c    | 1 +
 drivers/note/noteram_driver.c | 4 ++--
 include/nuttx/sched_note.h    | 1 +
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/note/note_driver.c b/drivers/note/note_driver.c
index c534c89c16..229a2a9d12 100644
--- a/drivers/note/note_driver.c
+++ b/drivers/note/note_driver.c
@@ -1342,6 +1342,7 @@ void sched_note_irqhandler(int irq, FAR void *handler, bool enter)
                       enter ? NOTE_IRQ_ENTER : NOTE_IRQ_LEAVE);
           DEBUGASSERT(irq <= UCHAR_MAX);
           note.nih_irq = irq;
+          note.nih_handler = (uintptr_t)handler;
         }
 
       /* Add the note to circular buffer */
diff --git a/drivers/note/noteram_driver.c b/drivers/note/noteram_driver.c
index fe291e9cc7..50b67a9fe0 100644
--- a/drivers/note/noteram_driver.c
+++ b/drivers/note/noteram_driver.c
@@ -887,8 +887,8 @@ static int noteram_dump_one(FAR uint8_t *p, FAR struct lib_outstream_s *s,
 
         nih = (FAR struct note_irqhandler_s *)p;
         ret += noteram_dump_header(s, note, ctx);
-        ret += lib_sprintf(s, "irq_handler_entry: irq=%u name=%d\n",
-                          nih->nih_irq, nih->nih_irq);
+        ret += lib_sprintf(s, "irq_handler_entry: irq=%u name=%pS\n",
+                           nih->nih_irq, (FAR void *)nih->nih_handler);
         cctx->intr_nest++;
       }
       break;
diff --git a/include/nuttx/sched_note.h b/include/nuttx/sched_note.h
index 14576dfaf4..55e2bdb7d9 100644
--- a/include/nuttx/sched_note.h
+++ b/include/nuttx/sched_note.h
@@ -409,6 +409,7 @@ struct note_syscall_leave_s
 struct note_irqhandler_s
 {
   struct note_common_s nih_cmn; /* Common note parameters */
+  uintptr_t nih_handler;        /* IRQ handler address */
   uint8_t nih_irq;              /* IRQ number */
 };
 #endif /* CONFIG_SCHED_INSTRUMENTATION_IRQHANDLER */