mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
cmake PMP fetch FlameGraph to build directory
This commit is contained in:
committed by
Lorenz Meier
parent
1dd67e7787
commit
6b02fc083e
@@ -281,9 +281,21 @@ add_custom_target(debug
|
||||
DEPENDS ${FW_NAME} ${CMAKE_CURRENT_BINARY_DIR}/.gdbinit
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
|
||||
# Poor man's profiler
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(FlameGraph
|
||||
GIT_REPOSITORY "https://github.com/brendangregg/FlameGraph.git"
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
EXCLUDE_FROM_ALL 1
|
||||
)
|
||||
|
||||
add_custom_target(profile
|
||||
COMMAND ${PX4_SOURCE_DIR}/platforms/nuttx/Debug/poor-mans-profiler.sh --elf=$<TARGET_FILE:${FW_NAME}> --nsamples=10000
|
||||
DEPENDS ${FW_NAME} ${PX4_SOURCE_DIR}/platforms/nuttx/Debug/poor-mans-profiler.sh
|
||||
COMMAND ${CMAKE_COMMAND} -E env PATH="${PX4_BINARY_DIR}/external/Source/FlameGraph:$ENV{PATH}" ${PX4_SOURCE_DIR}/platforms/nuttx/Debug/poor-mans-profiler.sh --elf=$<TARGET_FILE:${FW_NAME}> --nsamples=10000
|
||||
DEPENDS ${FW_NAME} ${PX4_SOURCE_DIR}/platforms/nuttx/Debug/poor-mans-profiler.sh FlameGraph
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user