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 a6e15f6fbd7 driver/note: Add tag to note_event_s and note_printf_s
a6e15f6fbd7 is described below
commit a6e15f6fbd7d167b9967427e1f5c87df53027665
Author: yukangzhi <[email protected]>
AuthorDate: Fri Mar 28 18:33:31 2025 +0800
driver/note: Add tag to note_event_s and note_printf_s
Record the tag in note_event_s and note_printf_s for log filtering.
Signed-off-by: yukangzhi <[email protected]>
---
drivers/note/note_driver.c | 2 ++
include/nuttx/sched_note.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/drivers/note/note_driver.c b/drivers/note/note_driver.c
index daab6fe87dd..273b75beb38 100644
--- a/drivers/note/note_driver.c
+++ b/drivers/note/note_driver.c
@@ -1520,6 +1520,7 @@ void sched_note_event_ip(uint32_t tag, uintptr_t ip,
uint8_t event,
note_common(tcb, ¬e->nev_cmn, length, event);
note->nev_ip = ip;
+ note->nev_tag = tag;
if (buf != NULL)
{
memcpy(note->nev_data, buf, length - SIZEOF_NOTE_EVENT(0));
@@ -1799,6 +1800,7 @@ void sched_note_vprintf_ip(uint32_t tag, uintptr_t ip,
FAR const char *fmt,
length = SIZEOF_NOTE_PRINTF(next);
note_common(tcb, ¬e->npt_cmn, length, NOTE_DUMP_PRINTF);
note->npt_ip = ip;
+ note->npt_tag = tag;
note->npt_fmt = fmt;
note->npt_type = type;
}
diff --git a/include/nuttx/sched_note.h b/include/nuttx/sched_note.h
index ac1e807ee24..f6e64943b63 100644
--- a/include/nuttx/sched_note.h
+++ b/include/nuttx/sched_note.h
@@ -472,6 +472,7 @@ struct note_printf_s
struct note_common_s npt_cmn; /* Common note parameters */
uintptr_t npt_ip; /* Instruction pointer called from */
FAR const char *npt_fmt; /* Printf format string */
+ uint32_t npt_tag; /* Printf tag */
uint32_t npt_type; /* Printf parameter type */
char npt_data[1]; /* Print arguments */
};
@@ -483,6 +484,7 @@ struct note_event_s
{
struct note_common_s nev_cmn; /* Common note parameters */
uintptr_t nev_ip; /* Instruction pointer called from */
+ uint32_t nev_tag; /* Event tag */
uint8_t nev_data[1]; /* Event data */
};