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 221ae1f1d1 drivers/note: Add support for atrace mark/counter type
221ae1f1d1 is described below

commit 221ae1f1d15216213ea0226d89db3de595d6509a
Author: yinshengkai <[email protected]>
AuthorDate: Thu Aug 24 20:01:16 2023 +0800

    drivers/note: Add support for atrace mark/counter type
    
    Use sched_note_mark to view event markers/counter in perfetto
    
    Signed-off-by: yinshengkai <[email protected]>
---
 include/nuttx/sched_note.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/nuttx/sched_note.h b/include/nuttx/sched_note.h
index 55e2bdb7d9..95afa011ed 100644
--- a/include/nuttx/sched_note.h
+++ b/include/nuttx/sched_note.h
@@ -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) \

Reply via email to