Skip to content

Commit

Permalink
add sched note for littlefs/romfs/rpmsgfs
Browse files Browse the repository at this point in the history
Signed-off-by: Shoukui Zhang <[email protected]>
  • Loading branch information
Zhangshoukui authored and acassis committed Sep 17, 2024
1 parent 583f025 commit 175fcb7
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2423,6 +2423,24 @@ config TRACE_FS
bool "Enable tracepoints in fs"
default n

if TRACE_FS
menu "Trace Fs Support"

config TRACE_LITTLEFS_FS
bool "Enable tracepoints in littlefs"
default n

config TRACE_ROMFS_FS
bool "Enable tracepoints in romfs"
default n

config TRACE_RPMSGFS_FS
bool "Enable tracepoints in rpmsgfs"
default n

endmenu # Trace Fs Support
endif

config TRACE_GRAPHICS
bool "Enable tracepoints in graphics"
default n
Expand Down
5 changes: 5 additions & 0 deletions fs/littlefs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,9 @@ if(CONFIG_FS_LITTLEFS)
${CMAKE_CURRENT_LIST_DIR}/littlefs/lfs_util.c)

target_include_directories(fs PRIVATE ${CMAKE_CURRENT_LIST_DIR})

if(CONFIG_TRACE_LITTLEFS_FS)
set_source_files_properties(lfs_vfs.c PROPERTIES COMPILE_FLAGS
-finstrument-functions)
endif()
endif()
4 changes: 4 additions & 0 deletions fs/littlefs/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ ifeq ($(CONFIG_FS_LITTLEFS),y)

CSRCS += lfs_vfs.c

ifeq ($(CONFIG_TRACE_LITTLEFS_FS),y)
littlefs/lfs_vfs.c_CFLAGS += -finstrument-functions
endif

DEPPATH += --dep-path littlefs
VPATH += :littlefs

Expand Down
5 changes: 5 additions & 0 deletions fs/romfs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ if(CONFIG_FS_ROMFS)

target_sources(fs PRIVATE fs_romfs.c fs_romfsutil.c)

if(CONFIG_TRACE_ROMFS_FS)
set_source_files_properties(fs_romfs.c PROPERTIES COMPILE_FLAGS
-finstrument-functions)
endif()

endif()
4 changes: 4 additions & 0 deletions fs/romfs/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ ifeq ($(CONFIG_FS_ROMFS),y)

CSRCS += fs_romfs.c fs_romfsutil.c

ifeq ($(CONFIG_TRACE_ROMFS_FS),y)
romfs/fs_romfs.c_CFLAGS += -finstrument-functions
endif

# Include ROMFS build support

DEPPATH += --dep-path romfs
Expand Down
5 changes: 5 additions & 0 deletions fs/rpmsgfs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ endif()
if(CONFIG_FS_RPMSGFS_SERVER)
target_sources(fs PRIVATE rpmsgfs_server.c)
endif()

if(CONFIG_TRACE_RPMSGFS_FS)
set_source_files_properties(rpmsgfs.c PROPERTIES COMPILE_FLAGS
-finstrument-functions)
endif()
3 changes: 3 additions & 0 deletions fs/rpmsgfs/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ VPATH += :rpmsgfs

ifeq ($(CONFIG_FS_RPMSGFS),y)
CSRCS += rpmsgfs.c rpmsgfs_client.c
ifeq ($(CONFIG_TRACE_RPMSGFS_FS),y)
rpmsgfs/rpmsgfs.c_CFLAGS += -finstrument-functions
endif
endif

ifeq ($(CONFIG_FS_RPMSGFS_SERVER),y)
Expand Down

0 comments on commit 175fcb7

Please sign in to comment.