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
commit 6ad06ba00499c8ada13a4a5d6b2ec3b0bbf24fb8 Author: cuiziwei <[email protected]> AuthorDate: Tue Dec 5 19:37:41 2023 +0800 note:unified note filtering at runtime. Signed-off-by: cuiziwei <[email protected]> --- Kconfig | 16 ++++++++++++++-- include/nuttx/sched_note.h | 3 ++- include/nuttx/trace.h | 8 ++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/Kconfig b/Kconfig index bb564c2c39..3fc3d8ecd2 100644 --- a/Kconfig +++ b/Kconfig @@ -2504,14 +2504,18 @@ menuconfig TRACE the kernel will be enabled. if TRACE -config TRACE_AUDIO - bool "Enable tracepoints in audio" +config TRACE_APP + bool "Enable tracepoints in app" default n config TRACE_ARCH bool "Enable tracepoints in arch" default n +config TRACE_AUDIO + bool "Enable tracepoints in audio" + default n + config TRACE_BOARDS bool "Enable tracepoints in boards" default n @@ -2550,10 +2554,18 @@ config TRACE_GRAPHICS bool "Enable tracepoints in graphics" default n +config TRACE_INPUT + bool "Enable tracepoints in input" + default n + config TRACE_LIBS bool "Enable tracepoints in libs" default n +config TRACE_MM + bool "Enable tracepoints in mm" + default n + config TRACE_NET bool "Enable tracepoints in net" default n diff --git a/include/nuttx/sched_note.h b/include/nuttx/sched_note.h index b0f3434e0c..18f78598fd 100644 --- a/include/nuttx/sched_note.h +++ b/include/nuttx/sched_note.h @@ -293,12 +293,13 @@ enum note_tag_e NOTE_TAG_APP, NOTE_TAG_ARCH, NOTE_TAG_AUDIO, - NOTE_TAG_BOARD, + NOTE_TAG_BOARDS, NOTE_TAG_CRYPTO, NOTE_TAG_DRIVERS, NOTE_TAG_FS, NOTE_TAG_GRAPHICS, NOTE_TAG_INPUT, + NOTE_TAG_LIBS, NOTE_TAG_MM, NOTE_TAG_NET, NOTE_TAG_SCHED, diff --git a/include/nuttx/trace.h b/include/nuttx/trace.h index f055936ecb..4f66d0c914 100644 --- a/include/nuttx/trace.h +++ b/include/nuttx/trace.h @@ -105,6 +105,14 @@ # define graphics_trace_end() #endif +#ifdef CONFIG_TRACE_INPUT +# define input_trace_begin() trace_begin(NOTE_TAG_INPUT) +# define input_trace_end() trace_end(NOTE_TAG_INPUT) +#else +# define input_trace_begin() +# define input_trace_end() +#endif + #ifdef CONFIG_TRACE_LIBS # define libs_trace_begin() trace_begin(NOTE_TAG_LIBS) # define libs_trace_end() trace_end(NOTE_TAG_LIBS)
