sched/note: Change sched_note_[begin|end] to macro

improve the speed

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-12-16 00:14:20 +08:00 committed by Petro Karashchenko
parent 552cf4b549
commit 06842c824a
2 changed files with 4 additions and 16 deletions

View File

@ -1124,16 +1124,6 @@ void sched_note_bprintf(uintptr_t ip, uint8_t event,
sched_note_vbprintf(ip, event, fmt, va);
va_end(va);
}
void sched_note_begin(uintptr_t ip)
{
sched_note_string(ip, "B");
}
void sched_note_end(uintptr_t ip)
{
sched_note_string(ip, "E");
}
#endif /* CONFIG_SCHED_INSTRUMENTATION_DUMP */
#ifdef CONFIG_SCHED_INSTRUMENTATION_FILTER

View File

@ -546,8 +546,6 @@ void sched_note_printf(uintptr_t ip,
FAR const char *fmt, ...) printflike(2, 3);
void sched_note_bprintf(uintptr_t ip, uint8_t event,
FAR const char *fmt, ...) printflike(3, 4);
void sched_note_begin(uintptr_t ip);
void sched_note_end(uintptr_t ip);
#else
# define sched_note_string(ip,b)
# define sched_note_dump(ip,e,b,l)
@ -555,8 +553,6 @@ void sched_note_end(uintptr_t ip);
# define sched_note_vbprintf(ip,e,f,v)
# define sched_note_printf(ip,f,...)
# define sched_note_bprintf(ip,e,f,...)
# define sched_note_begin(ip)
# define sched_note_end(ip)
#endif /* CONFIG_SCHED_INSTRUMENTATION_DUMP */
#if defined(__KERNEL__) || defined(CONFIG_BUILD_FLAT)
@ -698,8 +694,10 @@ void sched_note_filter_irq(FAR struct note_filter_irq_s *oldf,
# define sched_note_vbprintf(ip,e,f,v)
# define sched_note_printf(ip,f,...)
# define sched_note_bprintf(ip,e,f,...)
# define sched_note_begin(ip,f)
# define sched_note_end(ip,f)
#endif /* CONFIG_SCHED_INSTRUMENTATION */
#define sched_note_begin(ip) sched_note_string(ip, "B")
#define sched_note_end(ip) sched_note_string(ip, "E")
#endif /* __INCLUDE_NUTTX_SCHED_NOTE_H */