Anton Komlev | d7502f8 | 2022-06-29 16:52:21 +0100 | [diff] [blame] | 1 | ####################### |
| 2 | SQUAD metrics dashboard |
| 3 | ####################### |
| 4 | |
| 5 | :Author: Hugo L'Hostis |
| 6 | :Organization: Arm Limited |
| 7 | :Contact: hugo.lhostis@arm.com |
| 8 | |
| 9 | ****************** |
| 10 | SQUAD Presentation |
| 11 | ****************** |
| 12 | |
| 13 | Software Quality Dashboard (SQUAD) is a tool used by Trusted Firmware-M (TF-M) |
| 14 | to keep track of some metrics for the project. It is a Linaro project (see here |
| 15 | a link to the `SQUAD Documentation`_). |
| 16 | |
| 17 | For TF-M the purpose of having such a tool available is to have a history on |
| 18 | some metrics of the project for different configurations of TF-M. |
| 19 | |
| 20 | The TF-M SQUAD is available here : `TFM's SQUAD`_. There are several |
| 21 | configurations and metrics that can be selected, here is a link with some of |
| 22 | them already selected : |
| 23 | `SQUAD parametered for Default, profileS and MinsizeProfileS`_. |
| 24 | |
| 25 | ************************** |
| 26 | Metrics and configurations |
| 27 | ************************** |
| 28 | |
| 29 | The metrics sent to the dashboard are currently the memory footprint |
| 30 | measurements from the TFM project calculated by the arm-none-eabi-size |
| 31 | function 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 | |
| 38 | Each metric sent to the dashboard can be compared for different configurations |
| 39 | used. 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 | |
| 49 | For all of the configurations, tests are disabled and the release build type is |
Elena Uziunaite | b90a340 | 2023-11-13 16:24:28 +0000 | [diff] [blame] | 50 | used. |
Anton Komlev | d7502f8 | 2022-06-29 16:52:21 +0100 | [diff] [blame] | 51 | More configurations and metrics could be added to the dashboard in the future. |
| 52 | |
| 53 | For each metric sent to the SQUAD dashboard, the metric must be linked with the |
| 54 | state of the TF-M repository at the time of the build. On the dashboard this is |
| 55 | visible from a string of numbers in the abscissa of the graphs displayed in |
| 56 | SQUAD. This is the change ID of the latest commit used for the build. This |
| 57 | means that in the case of 2 consecutive days with no new commit for TF-M, no |
| 58 | new data points will be created. |
| 59 | |
| 60 | ************** |
| 61 | CI integration |
| 62 | ************** |
| 63 | |
| 64 | The data is currently sent by the `TFM CI's nightly build`_. |
| 65 | |
| 66 | The parameter "SQUAD_CONFIGURATIONS" of the CI build is what will trigger the |
| 67 | configurations sent to the SQUAD dashboard. It should be set to the |
| 68 | configurations's names separated by a comma, example : |
| 69 | |
| 70 | ``SQUAD_CONFIGURATIONS = Default,DefaultProfileS`` |
| 71 | |
| 72 | In this case, the 2 configurations Default and DefaultProfileS will be enabled |
| 73 | and the data for those (and only those 2) will be sent to the dashboard. |
| 74 | This is case insensitive and will ignore any space between the configurations. |
| 75 | All the files manipulating the data and sending the data is available in the |
| 76 | `tf-m-ci-scripts repo`_. |
| 77 | |
| 78 | The script `memory_footprint.py`_ is launched by the CI nightly build, it |
| 79 | gathers and sends the data. |
| 80 | |
| 81 | ********************* |
| 82 | Adding a new platform |
| 83 | ********************* |
| 84 | |
| 85 | Currently, all the data sent is from AN521 builds. To add a new platform to the |
| 86 | dashboard : |
| 87 | |
| 88 | 1. If the new platform is not already tested by the CI nightly build, it needs |
| 89 | to be added. |
| 90 | |
| 91 | 2. The ``memory_footprint.py`` file in the `tf-m-ci-scripts repo`_ has to be |
| 92 | modified to recognise the new platform. |
| 93 | |
| 94 | 3. If ``memory_footprint.py`` detects the new platform with a reference |
| 95 | configuration, it should send a new metric with a different name to the |
| 96 | existing ones containing the platform's name. |
| 97 | |
| 98 | The data will then be accessible by selecting the correct metrics on the |
| 99 | dashboard. |
| 100 | |
| 101 | |
| 102 | .. _SQUAD Documentation: https://squad.readthedocs.io/en/latest/index.html |
| 103 | .. _TFM's SQUAD: https://qa-reports.linaro.org/tf/tf-m/metrics/ |
| 104 | .. _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 |
| 105 | .. _TFM CI's nightly build: https://ci.trustedfirmware.org/view/TF-M/job/tf-m-nightly/ |
| 106 | .. _tf-m-ci-scripts repo: https://review.trustedfirmware.org/admin/repos/ci/tf-m-ci-scripts |
| 107 | .. _memory_footprint.py: https://git.trustedfirmware.org/ci/tf-m-ci-scripts.git/tree/memory_footprint.py?h=refs/heads/master |
| 108 | |
| 109 | -------------- |
| 110 | |
| 111 | *Copyright (c) 2021, Arm Limited. All rights reserved.* |