Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts: size_report: Fixes and improvements #72316

Merged
merged 6 commits into from
May 13, 2024

Conversation

golowanow
Copy link
Member

Several fixes and improvements to scripts/footprint/size_report - see details in the commit descriptions.

Fix integer underflow bug on a section end address calculation
causing incorrect address range for zero length sections and
potential mistakes on symbol to memory area match.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Remove unused import to resolve pylint warning.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Read ELF headers only once for the size_report scirpt called
for 'all' memory areas, consequently it executes 30-50% faster.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Don't set 'address' property for non-terminal nodes which are
also shown in JSON footprint reports, thus to avoid confusion
that a file or directory node has a continuous memory area allocated
at some address and with the total size of all its associated child
nodes which are likely scattered over different memory sections.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Report section name for symbols: both at json and text reports.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
@golowanow golowanow marked this pull request as ready for review May 4, 2024 15:25
@golowanow golowanow added bug The issue is a bug, or the PR is fixing a bug Enhancement Changes/Updates/Additions to existing features Footprint Issues related to the footprint (size) of the Zephyr images labels May 4, 2024
Fix the memory footprint tree build for symbols with copies,
e.g. static inline functions which are local per each compilation
unit. Copies have the same path and symbol name, but different
memory blocks associated, so they have to have separate nodes.
Before the fix, these copies were merged into one node, with
summary size and memory address of one of the symbols.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
@nashif nashif merged commit 2005ded into zephyrproject-rtos:main May 13, 2024
16 checks passed
@golowanow golowanow deleted the size_report_20240503 branch May 17, 2024 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug Enhancement Changes/Updates/Additions to existing features Footprint Issues related to the footprint (size) of the Zephyr images
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants