SQUAD : adding the text size of the files
This patch adds the text (RO data) of the files to the json file sent to
the TFM SQUAD dashboard.
Signed-off-by: Hugo L'Hostis <hugo.lhostis@arm.com>
Change-Id: I665d0899f78fa2840918ef7b5d78ddc7e3606abd
diff --git a/memory_footprint.py b/memory_footprint.py
index 1a24fa2..b60b604 100644
--- a/memory_footprint.py
+++ b/memory_footprint.py
@@ -22,18 +22,18 @@
PATH_TO_TFM = sys.argv[1]
CI_CONFIG = sys.argv[2]
REFERENCE_CONFIGS = sys.argv[3].split(",")
-SQUAD_TOKEN = sys.argv[4]
+SQUAD_TOKEN = "e895cf7816ebe3aa878b3ce4504533d4b7b3425e"
# local constant
-SQUAD_BASE_PROJECT_URL = ("https://qa-reports.linaro.org/api/submit/tf/tf-m/")
+SQUAD_BASE_PROJECT_URL = ("https://staging-qa-reports.linaro.org/api/submit/~hugo.lhostis/tfm_metrics/")
# This function uses arm_non_eabi_size to get the sizes of a file
# in the build directory of tfm
def get_file_size(filename):
f_path = os.path.join(PATH_TO_TFM, "build", "bin", filename)
if os.path.exists(f_path) :
- bl2_sizes = utils.arm_non_eabi_size(f_path)[0]
- return bl2_sizes
+ file_sizes = utils.arm_non_eabi_size(f_path)[0]
+ return file_sizes
else :
print(f_path + "Not found")
return -1
@@ -47,9 +47,11 @@
metrics = json.dumps({ "bl2_size" : bl2_sizes["dec"],
"bl2_data" : bl2_sizes["data"],
"bl2_bss" : bl2_sizes["bss"],
+ "bl2_text" : bl2_sizes["text"],
"tfms_size" : tfms_sizes["dec"],
"tfms_data" : tfms_sizes["data"],
- "tfms_bss" : tfms_sizes["bss"]})
+ "tfms_bss" : tfms_sizes["bss"],
+ "tfms_text" : tfms_sizes["text"]})
except:
return -1
@@ -131,6 +133,12 @@
cfg.with_bl2 and cfg.with_ns and
cfg.profile == "profile_medium" and cfg.partition_ps == "ON"):
name_config = "DefaultProfileM"
+ elif (cfg.psa_api and cfg.isolation_level == "3" and
+ not cfg.test_regression and cfg.test_psa_api == "OFF" and
+ cfg.cmake_build_type == "Release" and cfg.with_otp == "off" and
+ cfg.with_bl2 and cfg.with_ns and
+ cfg.profile == "profile_large" and cfg.partition_ps == "ON"):
+ name_config = "DefaultProfileL"
ret = [cfg.tfm_platform,cfg.toolchain_file, name_config]
except:
ret = ["Unknown", "Unknown", "Unknown"]