From e12b37e83885342b7664f7434a3988ab5c6cc111 Mon Sep 17 00:00:00 2001 From: Zingo Andersen Date: Mon, 23 Sep 2024 09:24:26 -0700 Subject: [PATCH] Arm backend: Track target flash size metrics (#5342) Summary: This logs the metrics from the size command when building with run.sh Pull Request resolved: https://github.com/pytorch/executorch/pull/5342 Reviewed By: manuelcandales Differential Revision: D62874679 Pulled By: digantdesai fbshipit-source-id: f69bfa12c48101e540e684a590f78b546903cb42 --- examples/arm/run.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/arm/run.sh b/examples/arm/run.sh index f41e0ef50c..4a3f6dbf67 100755 --- a/examples/arm/run.sh +++ b/examples/arm/run.sh @@ -147,6 +147,10 @@ function build_executorch_runner() { cmake --build cmake-out -- -j"$((n - 5))" arm_executor_runner echo "[${FUNCNAME[0]}] Generated baremetal elf file:" find cmake-out -name "arm_executor_runner" + echo "executable_text: $(find -name arm_executor_runner -exec size {} \; | grep -v filename | awk '{print $1}') bytes" + echo "executable_data: $(find -name arm_executor_runner -exec size {} \; | grep -v filename | awk '{print $2}') bytes" + echo "executable_bss: $(find -name arm_executor_runner -exec size {} \; | grep -v filename | awk '{print $3}') bytes" + echo "pte_data_size: $(stat -c%s ${pte}) bytes" } # Execute the executor_runner on FVP Simulator