Skip to content

Instantly share code, notes, and snippets.

@sughoshg
Created July 28, 2024 16:37
Show Gist options
  • Save sughoshg/d4f9bda8d8a33f715dab892738d192ba to your computer and use it in GitHub Desktop.
Save sughoshg/d4f9bda8d8a33f715dab892738d192ba to your computer and use it in GitHub Desktop.
LMB change size impact
alist realloc
-------------
~/uboot_build_size_check.sh --board rpi_4 --branch lmb_only_common_apis_no_tests_v3
Building 2 commits for 1 boards (1 thread, 20 jobs per thread)
01: Merge tag 'dm-pull-26jul24' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
33: stm32mp: do not add lmb memory before relocation
2 0 0 /2 rpi_4
Completed: 2 total built, 2 newly), duration 0:00:12, rate 0.17
/tmp/rpi_4/lmb_only_common_apis_no_tests_v3/boards.cfg is up to date. Nothing to do.
Summary of 2 commits for 1 boards (1 thread, 20 jobs per thread)
01: Merge tag 'dm-pull-26jul24' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
33: stm32mp: do not add lmb memory before relocation
aarch64: (for 1/1 boards) all +38.0 bss -752.0 data +8.0 rodata +34.0 text +748.0
rpi_4 : all +38 bss -752 data +8 rodata +34 text +748
u-boot: add: 11/-9, grow: 17/-12 bytes: 2528/-2704 (-176)
function old new delta
do_bdinfo 8 864 +856
lmb_add_region_flags 568 828 +260
lmb_mem_regions_init - 244 +244
lmb_alloc_base 76 292 +216
alist_ensure_ptr - 140 +140
alist_expand_to - 136 +136
alist_init - 108 +108
alist_uninit_move_ptr - 76 +76
alist_add_ptr - 72 +72
do_load 664 732 +68
initr_lmb - 52 +52
alist_uninit - 48 +48
str_to_list 188 232 +44
lmb_get_free_size 136 168 +32
lmb_alloc_addr 112 140 +28
tftp_start 924 944 +20
lmb_used_mem - 16 +16
lmb_free_mem - 16 +16
lmb_add 8 24 +16
lmb_reserve 12 24 +12
image_setup_libfdt 452 464 +12
boot_relocate_fdt 528 540 +12
alist_expand_by - 12 +12
lmb_free 216 224 +8
init_sequence_r 272 280 +8
boot_ramdisk_high 280 288 +8
lmb_remove_region 68 72 +4
lmb_alloc 8 12 +4
lmb_dump_region 140 136 -4
lmb_dump_all_force 68 64 -4
lmb_reserve_flags 8 - -8
lmb_overlaps_region 84 76 -8
efi_install_fdt 452 444 -8
efi_dt_fixup 324 316 -8
do_bootm_vxworks 488 480 -8
image_setup_linux 96 84 -12
arch_lmb_reserve_generic 212 200 -12
load_serial 536 520 -16
boot_fdt_add_mem_rsv_regions 296 280 -16
arch_lmb_reserve 16 - -16
bootm_run_states 1884 1832 -52
lmb_init_and_reserve_range 56 - -56
tftp_init_load_addr 100 - -100
lmb_init_and_reserve 100 - -100
static.fs_read_lmb_check 164 - -164
lmb_reserve_common 180 - -180
__lmb_alloc_base 240 - -240
images 1120 320 -800
bdinfo_print_all 892 - -892
(no errors to report)
======================================================================================
alist malloc
------------
~/uboot_build_size_check.sh --board rpi_4 --branch lmb_only_common_apis_v3_alist_no_tests_malloc
Building 2 commits for 1 boards (1 thread, 20 jobs per thread)
01: Merge tag 'dm-pull-26jul24' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
33: stm32mp: do not add lmb memory before relocation
2 0 0 /2 rpi_4
Completed: 2 total built, 2 newly), duration 0:00:12, rate 0.17
/tmp/rpi_4/lmb_only_common_apis_v3_alist_no_tests_malloc/boards.cfg is up to date. Nothing to do.
Summary of 2 commits for 1 boards (1 thread, 20 jobs per thread)
01: Merge tag 'dm-pull-26jul24' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
33: stm32mp: do not add lmb memory before relocation
aarch64: (for 1/1 boards) all +34.0 bss -784.0 data +8.0 rodata +34.0 text +776.0
rpi_4 : all +34 bss -784 data +8 rodata +34 text +776
u-boot: add: 11/-9, grow: 17/-12 bytes: 2556/-2704 (-148)
function old new delta
do_bdinfo 8 864 +856
lmb_add_region_flags 568 828 +260
lmb_mem_regions_init - 244 +244
lmb_alloc_base 76 292 +216
alist_expand_to - 164 +164
alist_ensure_ptr - 140 +140
alist_init - 108 +108
alist_uninit_move_ptr - 76 +76
alist_add_ptr - 72 +72
do_load 664 732 +68
initr_lmb - 52 +52
alist_uninit - 48 +48
str_to_list 188 232 +44
lmb_get_free_size 136 168 +32
lmb_alloc_addr 112 140 +28
tftp_start 924 944 +20
lmb_used_mem - 16 +16
lmb_free_mem - 16 +16
lmb_add 8 24 +16
lmb_reserve 12 24 +12
image_setup_libfdt 452 464 +12
boot_relocate_fdt 528 540 +12
alist_expand_by - 12 +12
lmb_free 216 224 +8
init_sequence_r 272 280 +8
boot_ramdisk_high 280 288 +8
lmb_remove_region 68 72 +4
lmb_alloc 8 12 +4
lmb_dump_region 140 136 -4
lmb_dump_all_force 68 64 -4
lmb_reserve_flags 8 - -8
lmb_overlaps_region 84 76 -8
efi_install_fdt 452 444 -8
efi_dt_fixup 324 316 -8
do_bootm_vxworks 488 480 -8
image_setup_linux 96 84 -12
arch_lmb_reserve_generic 212 200 -12
load_serial 536 520 -16
boot_fdt_add_mem_rsv_regions 296 280 -16
arch_lmb_reserve 16 - -16
bootm_run_states 1884 1832 -52
lmb_init_and_reserve_range 56 - -56
tftp_init_load_addr 100 - -100
lmb_init_and_reserve 100 - -100
static.fs_read_lmb_check 164 - -164
lmb_reserve_common 180 - -180
__lmb_alloc_base 240 - -240
images 1120 320 -800
bdinfo_print_all 892 - -892
(no errors to report)
suggan01@a079122:~/tmp/u-boot$
======================================================================================
linked list
-----------
~/uboot_build_size_check.sh --board rpi_4 --branch lmb_only_linked_lists_no_tests_v3
Building 2 commits for 1 boards (1 thread, 20 jobs per thread)
01: Merge tag 'dm-pull-26jul24' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
29: lmb: init: initialise the lmb data structures during board init
2 0 0 /2 rpi_4
Completed: 2 total built, 2 newly), duration 0:00:13, rate 0.15
/tmp/rpi_4/lmb_only_linked_lists_no_tests_v3/boards.cfg is up to date. Nothing to do.
Summary of 2 commits for 1 boards (1 thread, 20 jobs per thread)
01: Merge tag 'dm-pull-26jul24' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
29: lmb: init: initialise the lmb data structures during board init
aarch64: (for 1/1 boards) all -900.0 bss -808.0 data +48.0 text -140.0
rpi_4 : all -900 bss -808 data +48 text -140
u-boot: add: 6/-10, grow: 14/-12 bytes: 1676/-2836 (-1160)
function old new delta
do_bdinfo 8 864 +856
lmb_mem_regions_init - 184 +184
lmb_alloc_base 76 252 +176
lmb_merge_adjacents - 136 +136
do_load 664 732 +68
initr_lmb - 52 +52
lmb_mem_cmp - 28 +28
lmb_overlaps_region 84 108 +24
tftp_start 924 944 +20
lmb_dump_region 140 160 +20
lmb_used_mem - 16 +16
lmb_free_mem - 16 +16
lmb_add 8 24 +16
lmb_reserve 12 24 +12
image_setup_libfdt 452 464 +12
boot_relocate_fdt 528 540 +12
lmb_alloc_addr 112 120 +8
init_sequence_r 272 280 +8
boot_ramdisk_high 280 288 +8
lmb_alloc 8 12 +4
lmb_dump_all_force 68 64 -4
lmb_reserve_flags 8 - -8
efi_install_fdt 452 444 -8
efi_dt_fixup 324 316 -8
do_bootm_vxworks 488 480 -8
image_setup_linux 96 84 -12
arch_lmb_reserve_generic 212 200 -12
load_serial 536 520 -16
boot_fdt_add_mem_rsv_regions 296 280 -16
arch_lmb_reserve 16 - -16
lmb_free 216 196 -20
bootm_run_states 1884 1832 -52
lmb_init_and_reserve_range 56 - -56
lmb_add_region_flags 568 512 -56
lmb_remove_region 68 - -68
tftp_init_load_addr 100 - -100
lmb_init_and_reserve 100 - -100
static.fs_read_lmb_check 164 - -164
lmb_reserve_common 180 - -180
__lmb_alloc_base 240 - -240
images 1120 320 -800
bdinfo_print_all 892 - -892
(no errors to report)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment