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:
parent
552cf4b549
commit
06842c824a
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue