driver/note: dump irq handler address to trace

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
dongjiuzhu1 2023-06-20 16:56:24 +08:00 committed by Xiang Xiao
parent 69667e2c73
commit 29ddfd44a0
3 changed files with 4 additions and 2 deletions

View file

@ -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 */

View file

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

View file

@ -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 */