drivers/note: Add support for atrace mark/counter type

Use sched_note_mark to view event markers/counter in perfetto

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai 2023-08-24 20:01:16 +08:00 committed by Xiang Xiao
parent 7aa45305b7
commit 221ae1f1d1

View File

@ -139,6 +139,11 @@
sched_note_printf_ip(tag, SCHED_NOTE_IP, "B|%d|%s", gettid(), str)
# define sched_note_endex(tag, str) \
sched_note_printf_ip(tag, SCHED_NOTE_IP, "E|%d|%s", gettid(), str)
# define sched_note_mark(tag, str) \
sched_note_printf_ip(tag, SCHED_NOTE_IP, "I|%d|%s", gettid(), str)
# define sched_note_counter(tag, name, value) \
sched_note_printf_ip(tag, SCHED_NOTE_IP, "C|%d|%s|%" PRId32, \
gettid(), name, value)
# define sched_note_begin(tag) \
sched_note_string_ip(tag, SCHED_NOTE_IP, "B")
# define sched_note_end(tag) \