| a98d4661 | 16-Sep-2024 |
Jimmy Brisson <jimmy.brisson@arm.com> |
feat(memmap): add summary command to memory map script
This patch adds a `summary` command, invoked with:
poetry run memory summary <map-file>
This command is capable of producing a summary tabl
feat(memmap): add summary command to memory map script
This patch adds a `summary` command, invoked with:
poetry run memory summary <map-file>
This command is capable of producing a summary table, similar to the footprint command, or an HTML flame-graph representing the size of ELF image sections.
When specified with `-o` (`--old`), an old GNU map file is used as a past state and subtracted from the GNU map file specified by `<map-file>` to annotate printed information with additional size deltas.
Note that many bootloaders include alignment padding and will align to a page size. To exclude this alignment-padding from the summary, use the `-e` switch.
For example:
$ poetry run memory summary bl1.map -e -d 1 | Module | .text | .data | .bss | |-----------|--------------|----------|-----------| | bl1 | 32616(+24) | 2217(+0) | 11175(+0) | | lib | 55932(+2060) | 40(+0) | 10628(+0) | | Subtotals | 88548(+2084) | 2257(+0) | 21803(+0) | Total Static RAM memory (data + bss): 24060(+0) bytes Total Flash memory (text + data): 90805(+2084) bytes
Change-Id: Id0bc157d09e654f89730dfbe318fa5f820e9f18d Co-authored-by: Chris Kay <chris.kay@arm.com> Signed-off-by: Chris Kay <chris.kay@arm.com> Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
show more ...
|
| 8daebefe | 15-Apr-2025 |
Chris Kay <chris.kay@arm.com> |
refactor(memmap)!: change behavioural flags to commands
This change factors out the following memory map tool flags into independent commands:
- `--footprint` (becomes `memory footprint`) - `--tree
refactor(memmap)!: change behavioural flags to commands
This change factors out the following memory map tool flags into independent commands:
- `--footprint` (becomes `memory footprint`) - `--tree` (becomes `memory tree`) - `--symbol` (becomes `memory symbol`)
So, for example, where previously you would generate the memory footprint of a build with:
memory --tree
You would now instead use:
memory footprint
Any flags specific to a command (e.g. `--depth` for `tree`) must be specified after the command, e.g.
memory tree --depth 1
... instead of:
memory --depth 1 tree
BREAKING-CHANGE: The image memory map visualization tool now uses commands, rather than arguments, to determine the behaviour of the script. See the commit message for further details.
Change-Id: I11d54d1f6276b8447bdfb8496544ab80399459ac Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| 6acd79ab | 17-Apr-2025 |
Chris Kay <chris.kay@arm.com> |
refactor(memmap): fix typing-related issues
This change introduces Pyright - a static type checker for Python - and resolves a large number of the errors that it reports. Some errors have not been r
refactor(memmap): fix typing-related issues
This change introduces Pyright - a static type checker for Python - and resolves a large number of the errors that it reports. Some errors have not been resolved as they require larger refactors, so these will be done in later patches.
Change-Id: I2ed9b1cc729bf44a1fa8e69882af34657cc30b38 Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| bc74cfc7 | 15-Apr-2025 |
Chris Kay <chris.kay@arm.com> |
refactor(memmap): create common image parser interface
This is another non-functional change, which factors the memory footprint and symbol listing interfaces shared by the two image parsing backend
refactor(memmap): create common image parser interface
This is another non-functional change, which factors the memory footprint and symbol listing interfaces shared by the two image parsing backends into a common `Image` interface.
Change-Id: I625a8e5ca77e38155b6ed545a33a8ae4c2cf133a Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| b658ccd7 | 22-Apr-2025 |
Chris Kay <chris.kay@arm.com> |
refactor(memmap): represent image symbols with key-value map
The symbols defined by an image are currently returned as a list of tuple pairs, which is a fairly unintuitive way of representing what i
refactor(memmap): represent image symbols with key-value map
The symbols defined by an image are currently returned as a list of tuple pairs, which is a fairly unintuitive way of representing what is essentially a map.
This commit changes the return type to the appropriate map type, and moves the heavy-lifting required to turn it into a list of tuples into the printer, which is the only place where this representation is necessary.
Change-Id: I87d047608b390e1e0cdf93eb6af5aeb103b1d69e Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| 5bce4e60 | 14-Apr-2025 |
Chris Kay <chris.kay@arm.com> |
refactor(memmap): factor memory regions into their own structure
This is a non-functional change to clean up how we represent memory regions in the memory map tool.
This introduces the `Region` dat
refactor(memmap): factor memory regions into their own structure
This is a non-functional change to clean up how we represent memory regions in the memory map tool.
This introduces the `Region` data-class, which does little more than store the region data exposed by the linker scripts, and provides some additional helper methods which re-produce what was already being done by both the ELF parser and the map file parser.
Change-Id: Idf45b71bd460f7312498b97b9e4743f4dc482411 Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| 205248e8 | 28-Apr-2025 |
Chris Kay <chris.kay@arm.com> |
refactor(memmap): apply additional type hints
This is a non-functional change which adds type hints wherever they might be helpful. Outside of human readability, this can also help static analysis t
refactor(memmap): apply additional type hints
This is a non-functional change which adds type hints wherever they might be helpful. Outside of human readability, this can also help static analysis tools and IDEs identify additional errors.
Change-Id: Ie63e7f1cdeb893ca7d8a703aff56361eaa4e8f1b Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| f59b6fb5 | 01-May-2025 |
Chris Kay <chris.kay@arm.com> |
refactor(memmap): check ELF object type rather than flag
This is a small functional change which removes the need to pass the type of the ELF object given to `memory.elfparser.tfa_mem_obj_factory` b
refactor(memmap): check ELF object type rather than flag
This is a small functional change which removes the need to pass the type of the ELF object given to `memory.elfparser.tfa_mem_obj_factory` by instead checking its type.
Change-Id: I653e71345e41bcbae87a3a7475d7a1dd69614b5d Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| 015a8fd1 | 17-Apr-2025 |
Chris Kay <chris.kay@arm.com> |
refactor(memmap): remove unused functionality
The functionality removed by this patch is currently unused, and there are currently no plans to expose it to users.
Change-Id: I277fce51e0f34cd9608b4b
refactor(memmap): remove unused functionality
The functionality removed by this patch is currently unused, and there are currently no plans to expose it to users.
Change-Id: I277fce51e0f34cd9608b4bc1258c78af208897fa Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| 8ab677b9 | 17-Apr-2025 |
Chris Kay <chris.kay@arm.com> |
fix(memmap): ensure terminal width is respected
Python, for one reason or another, doesn't always get access to the terminal columns environment variable (`COLUMNS`). Instead, switch out this logic
fix(memmap): ensure terminal width is respected
Python, for one reason or another, doesn't always get access to the terminal columns environment variable (`COLUMNS`). Instead, switch out this logic with the Python-recommended way to get the terminal width, via the `shutil` import.
Change-Id: I3956f10e91b286404c4d9e802d94592a00c746fb Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| 6dc8ee61 | 17-Jan-2024 |
Sekhar Nori <nsekhar@ti.com> |
fix(memmap): fix memory map dump when SEPARATE_CODE_AND_RODATA=0
When building BL1 with SEPARATE_CODE_AND_RODATA=0, symbol names __RO_{START|END}__ are ignored by memory map dump script.
Fix it by
fix(memmap): fix memory map dump when SEPARATE_CODE_AND_RODATA=0
When building BL1 with SEPARATE_CODE_AND_RODATA=0, symbol names __RO_{START|END}__ are ignored by memory map dump script.
Fix it by including the symbol in regular expression.
While at it, update the copyright year to current.
Change-Id: Iafeab75c5711429ea0b744510caf27dd8784a29a Signed-off-by: Sekhar Nori <nsekhar@ti.com>
show more ...
|
| d9d5eb13 | 23-Feb-2023 |
Harrison Mutai <harrison.mutai@arm.com> |
feat(memmap): add tabular memory use data
Add support for tabulating static memory consumption data from ELF binaries. This relies on static symbols, defined in the linker files, that provide inform
feat(memmap): add tabular memory use data
Add support for tabulating static memory consumption data from ELF binaries. This relies on static symbols, defined in the linker files, that provide information about the memory ranges.
Change-Id: Ie19cd2b80a7b591607640feeb84c63266963ea4d Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
show more ...
|