Skip to content

Commit

Permalink
bloaty fix master comparison
Browse files Browse the repository at this point in the history
 - jenkins add new sections and segments output
  • Loading branch information
dagar committed Aug 6, 2019
1 parent 6f2d1d5 commit bf0eaf4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
8 changes: 6 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,11 @@ pipeline {
sh 'ccache -z'
sh 'git fetch --tags'
sh 'make px4_fmu-v2_default'
sh 'make px4_fmu-v2_default bloaty_symbols'
sh 'make px4_fmu-v2_default bloaty_compileunits'
sh 'make px4_fmu-v2_default bloaty_inlines'
sh 'make px4_fmu-v2_default bloaty_sections'
sh 'make px4_fmu-v2_default bloaty_segments'
sh 'make px4_fmu-v2_default bloaty_symbols'
sh 'make px4_fmu-v2_default bloaty_templates'
sh 'make px4_fmu-v2_default bloaty_compare_master'
sh 'make sizes'
Expand All @@ -135,9 +137,11 @@ pipeline {
sh 'ccache -z'
sh 'git fetch --tags'
sh 'make px4_fmu-v5_default'
sh 'make px4_fmu-v5_default bloaty_symbols'
sh 'make px4_fmu-v5_default bloaty_compileunits'
sh 'make px4_fmu-v5_default bloaty_inlines'
sh 'make px4_fmu-v5_default bloaty_sections'
sh 'make px4_fmu-v5_default bloaty_segments'
sh 'make px4_fmu-v5_default bloaty_symbols'
sh 'make px4_fmu-v5_default bloaty_templates'
sh 'make px4_fmu-v5_default bloaty_compare_master'
sh 'make sizes'
Expand Down
28 changes: 15 additions & 13 deletions cmake/bloaty.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,8 @@

find_program(BLOATY_PROGRAM bloaty)
if (BLOATY_PROGRAM)
# bloaty symbols

set(BLOATY_OPTS --demangle=short --domain=vm -s vm -n 100 -w)
add_custom_target(bloaty_symbols
COMMAND ${BLOATY_PROGRAM} -d symbols ${BLOATY_OPTS} $<TARGET_FILE:px4>
DEPENDS px4
USES_TERMINAL
)

# bloaty compilation units
add_custom_target(bloaty_compileunits
Expand All @@ -48,6 +43,13 @@ if (BLOATY_PROGRAM)
USES_TERMINAL
)

# bloaty inlines
add_custom_target(bloaty_inlines
COMMAND ${BLOATY_PROGRAM} -d inlines ${BLOATY_OPTS} $<TARGET_FILE:px4>
DEPENDS px4
USES_TERMINAL
)

# bloaty sections
add_custom_target(bloaty_sections
COMMAND ${BLOATY_PROGRAM} -d sections ${BLOATY_OPTS} $<TARGET_FILE:px4>
Expand All @@ -62,24 +64,24 @@ if (BLOATY_PROGRAM)
USES_TERMINAL
)

# bloaty templates
add_custom_target(bloaty_templates
COMMAND ${BLOATY_PROGRAM} -d shortsymbols,fullsymbols ${BLOATY_OPTS} $<TARGET_FILE:px4>
# bloaty symbols
add_custom_target(bloaty_symbols
COMMAND ${BLOATY_PROGRAM} -d symbols ${BLOATY_OPTS} $<TARGET_FILE:px4>
DEPENDS px4
USES_TERMINAL
)

# bloaty inlines
add_custom_target(bloaty_inlines
COMMAND ${BLOATY_PROGRAM} -d inlines ${BLOATY_OPTS} $<TARGET_FILE:px4>
# bloaty templates
add_custom_target(bloaty_templates
COMMAND ${BLOATY_PROGRAM} -d shortsymbols,fullsymbols ${BLOATY_OPTS} $<TARGET_FILE:px4>
DEPENDS px4
USES_TERMINAL
)

# bloaty compare with last master build
add_custom_target(bloaty_compare_master
COMMAND wget -c -N --no-verbose https://s3.amazonaws.com/px4-travis/Firmware/master/${PX4_BOARD_VENDOR}_${PX4_BOARD_MODEL}_${PX4_BOARD_LABEL}.elf -O master.elf
COMMAND ${BLOATY_PROGRAM} ${BLOATY_OPTS} $<TARGET_FILE:px4> -- master.elf
COMMAND ${BLOATY_PROGRAM} -d symbols ${BLOATY_OPTS} $<TARGET_FILE:px4> -- master.elf
DEPENDS px4
WORKING_DIRECTORY ${PX4_BINARY_DIR}
VERBATIM
Expand Down

0 comments on commit bf0eaf4

Please sign in to comment.