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

[bloat report] Use a default set of sections if there is no config #30248

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions scripts/tools/memory/gh_sizes.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,17 @@ def main(argv):
else:
output = pathlib.Path(binary).parent / output_base

config = Config().init({
config_desc = {
**memdf.util.config.CONFIG,
**memdf.collect.CONFIG,
**memdf.select.CONFIG,
**memdf.report.OUTPUT_CONFIG,
**CONFIG,
})
}
# In case there is no platform configuration file, default to using a popular set of section names.
config_desc['section.select']['default'] = ['.text', '.rodata', '.data', '.bss']

config = Config().init(config_desc)
config.put('output.file', output)
config.put('output.format', 'json_records')
if config_file.is_file():
Expand All @@ -181,7 +185,7 @@ def main(argv):

collected: DFs = memdf.collect.collect_files(config, [binary])

# Aggregate loaded segments, by writable (flash) or not (RAM).
# Aggregate loaded segments, by writable (RAM) or not (flash).
segments = collected[SegmentDF.name]
segments['segment'] = segments.index
segments['wr'] = ((segments['flags'] & 2) != 0).convert_dtypes(
Expand Down
Loading