mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
note: remove remaining event code
Some event-related codes were missed in the previous modification and have not been deleted. Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
@@ -89,13 +89,12 @@
|
||||
((drv)->ops->irqhandler(drv, irq, handler, enter), true))
|
||||
#define note_string(drv, ip, buf) \
|
||||
((drv)->ops->string && ((drv)->ops->string(drv, ip, buf), true))
|
||||
#define note_dump(drv, ip, buf, len) \
|
||||
((drv)->ops->dump && ((drv)->ops->dump(drv, ip, event, buf, len), true))
|
||||
#define note_event(drv, ip, event, buf, len) \
|
||||
((drv)->ops->event && ((drv)->ops->event(drv, ip, event, buf, len), true))
|
||||
#define note_vprintf(drv, ip, fmt, va) \
|
||||
((drv)->ops->vprintf && ((drv)->ops->vprintf(drv, ip, fmt, va), true))
|
||||
#define note_vbprintf(drv, ip, event, fmt, va) \
|
||||
((drv)->ops->vbprintf && \
|
||||
((drv)->ops->vbprintf(drv, ip, event, fmt, va), true))
|
||||
#define note_vbprintf(drv, ip, fmt, va) \
|
||||
((drv)->ops->vbprintf && ((drv)->ops->vbprintf(drv, ip, fmt, va), true))
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
@@ -1413,7 +1412,7 @@ void sched_note_event_ip(uint32_t tag, uintptr_t ip, uint8_t event,
|
||||
|
||||
for (driver = g_note_drivers; *driver; driver++)
|
||||
{
|
||||
if (note_dump(*driver, ip, buf, len))
|
||||
if (note_event(*driver, ip, event, buf, len))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -1501,7 +1500,7 @@ void sched_note_vprintf_ip(uint32_t tag, uintptr_t ip,
|
||||
}
|
||||
}
|
||||
|
||||
void sched_note_vbprintf_ip(uint32_t tag, uintptr_t ip, uint8_t event,
|
||||
void sched_note_vbprintf_ip(uint32_t tag, uintptr_t ip,
|
||||
FAR const char *fmt, va_list va)
|
||||
{
|
||||
FAR struct note_binary_s *note;
|
||||
@@ -1546,7 +1545,7 @@ void sched_note_vbprintf_ip(uint32_t tag, uintptr_t ip, uint8_t event,
|
||||
|
||||
for (driver = g_note_drivers; *driver; driver++)
|
||||
{
|
||||
if (note_vbprintf(*driver, ip, event, fmt, va))
|
||||
if (note_vbprintf(*driver, ip, fmt, va))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -1728,12 +1727,12 @@ void sched_note_printf_ip(uint32_t tag, uintptr_t ip,
|
||||
va_end(va);
|
||||
}
|
||||
|
||||
void sched_note_bprintf_ip(uint32_t tag, uintptr_t ip, uint8_t event,
|
||||
void sched_note_bprintf_ip(uint32_t tag, uintptr_t ip,
|
||||
FAR const char *fmt, ...)
|
||||
{
|
||||
va_list va;
|
||||
va_start(va, fmt);
|
||||
sched_note_vbprintf_ip(tag, ip, event, fmt, va);
|
||||
sched_note_vbprintf_ip(tag, ip, fmt, va);
|
||||
va_end(va);
|
||||
}
|
||||
#endif /* CONFIG_SCHED_INSTRUMENTATION_DUMP */
|
||||
|
||||
@@ -978,6 +978,9 @@ static int noteram_dump_one(FAR uint8_t *p, FAR struct lib_outstream_s *s,
|
||||
FAR struct note_binary_s *nbi = (FAR struct note_binary_s *)p;
|
||||
char c = note->nc_type == NOTE_DUMP_BEGIN ? 'B' : 'E';
|
||||
int len = note->nc_length - sizeof(struct note_binary_s);
|
||||
uintptr_t ip;
|
||||
|
||||
noteram_dump_unflatten(&ip, nbi->nbi_ip, sizeof(ip));
|
||||
ret += noteram_dump_header(s, &nbi->nbi_cmn, ctx);
|
||||
if (len > 0)
|
||||
{
|
||||
@@ -987,7 +990,7 @@ static int noteram_dump_one(FAR uint8_t *p, FAR struct lib_outstream_s *s,
|
||||
else
|
||||
{
|
||||
ret += lib_sprintf(s, "tracing_mark_write: %c|%d|%pS\n",
|
||||
c, pid, (FAR void *)nbi->nbi_ip);
|
||||
c, pid, (FAR void *)ip);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1023,8 +1026,8 @@ static int noteram_dump_one(FAR uint8_t *p, FAR struct lib_outstream_s *s,
|
||||
|
||||
noteram_dump_unflatten(&ip, nbi->nbi_ip, sizeof(ip));
|
||||
|
||||
ret += lib_sprintf(s, "tracing_mark_write: 0x%" PRIdPTR
|
||||
": count=%u", ip, count);
|
||||
ret += lib_sprintf(s, "tracing_mark_write: %pS: count=%u",
|
||||
(FAR void *)ip, count);
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
ret += lib_sprintf(s, " 0x%x", nbi->nbi_data[i]);
|
||||
|
||||
Reference in New Issue
Block a user