blob: 5da74a03104dbeca6577a7dd03c9066e22b1e6bb [file] [log] [blame]
Hugo L'Hostisfd6abed2021-05-05 10:40:08 +01001#######################
2SQUAD metrics dashboard
3#######################
4
5:Authors: Hugo L'Hostis
6:Organization: Arm Limited
7:Contact: hugo.lhostis@arm.com
8
9******************
10SQUAD Presentation
11******************
12
13Software Quality Dashboard (SQUAD) is a tool used by Trusted Firmware-M (TF-M)
14to keep track of some metrics for the project. It is a Linaro project (see here
15a link to the `SQUAD Documentation`_).
16
17For TF-M the purpose of having such a tool available is to have a history on
18some metrics of the project for different configurations of TF-M.
19
20The TF-M SQUAD is available here : `TFM's SQUAD`_. There are several
21configurations and metrics that can be selected, here is a link with some of
22them already selected :
23`SQUAD parametered for Default, profileS and MinsizeProfileS`_.
24
25**************************
26Metrics and configurations
27**************************
28
29The metrics sent to the dashboard are currently the memory footprint
30measurements from the TFM project calculated by the arm-none-eabi-size
31function for the 2 files bl2.axf and tfm_s.axf :
32
33 - Text section size.
34 - bss section size.
35 - data total size.
36 - Total file size.
37
38Each metric sent to the dashboard can be compared for different configurations
39used. The configurations available currently are the following :
40
41 - Default
42 - CoreIPC
43 - CoreIPCTfmLevel2
44 - DefaultProfileS
45 - DefaultProfileM
46 - DefaultProfileL
47 - MinSizeProfileS (DefaultProfileS with MinsizeRel Cmake type)
48
49For all of the configurations, tests are disabled and the release build type is
50used. For more details about the configurations and how the rest of the options
51are set for each of them, see
Summer Qinab1dd992021-05-25 13:58:55 +080052:ref:`docs/technical_references/instructions/tfm_build_instruction:Migration from legacy buildsystem`.
Hugo L'Hostisfd6abed2021-05-05 10:40:08 +010053More configurations and metrics could be added to the dashboard in the future.
54
55For each metric sent to the SQUAD dashboard, the metric must be linked with the
56state of the TF-M repository at the time of the build. On the dashboard this is
57visible from a string of numbers in the abscissa of the graphs displayed in
58SQUAD. This is the change ID of the latest commit used for the build. This
59means that in the case of 2 consecutive days with no new commit for TF-M, no
60new data points will be created.
61
62**************
63CI integration
64**************
65
66The data is currently sent by the `TFM CI's nightly build`_.
67
68The parameter "SQUAD_CONFIGURATIONS" of the CI build is what will trigger the
69configurations sent to the SQUAD dashboard. It should be set to the
70configurations's names separated by a comma, example :
71
72``SQUAD_CONFIGURATIONS = Default,DefaultProfileS``
73
74In this case, the 2 configurations Default and DefaultProfileS will be enabled
75and the data for those (and only those 2) will be sent to the dashboard.
76This is case insensitive and will ignore any space between the configurations.
77All the files manipulating the data and sending the data is available in the
78`tf-m-ci-scripts repo`_.
79
80The script `memory_footprint.py`_ is launched by the CI nightly build, it
81gathers and sends the data.
82
83*********************
84Adding a new platform
85*********************
86
87Currently, all the data sent is from AN521 builds. To add a new platform to the
88dashboard :
89
901. If the new platform is not already tested by the CI nightly build, it needs
91to be added.
92
932. The ``memory_footprint.py`` file in the `tf-m-ci-scripts repo`_ has to be
94modified to recognise the new platform.
95
963. If ``memory_footprint.py`` detects the new platform with a reference
97configuration, it should send a new metric with a different name to the
98existing ones containing the platform's name.
99
100The data will then be accessible by selecting the correct metrics on the
101dashboard.
102
103
104.. _SQUAD Documentation: https://squad.readthedocs.io/en/latest/index.html
105.. _TFM's SQUAD: https://qa-reports.linaro.org/tf/tf-m/metrics/
106.. _SQUAD parametered for Default, profileS and MinsizeProfileS: https://qa-reports.linaro.org/tf/tf-m/metrics/?environment=Default&environment=DefaultProfileS&environment=MinSizeProfileS&metric=tfms_size&metric=tfms_data&metric=tfms_bss&metric=bl2_size&metric=bl2_data&metric=bl2_bss&range_tfms_size=0,100&range_tfms_data=0,100&range_tfms_bss=0,100&range_bl2_size=0,100&range_bl2_data=0,100&range_bl2_bss=0,100
107.. _TFM CI's nightly build: https://ci.trustedfirmware.org/view/TF-M/job/tf-m-nightly/
108.. _tf-m-ci-scripts repo: https://review.trustedfirmware.org/admin/repos/ci/tf-m-ci-scripts
109.. _memory_footprint.py: https://git.trustedfirmware.org/ci/tf-m-ci-scripts.git/tree/memory_footprint.py?h=refs/heads/master
110
111--------------
112
113*Copyright (c) 2021, Arm Limited. All rights reserved.*