rimage: print cold data and text percentage#9837
Merged
kv2019i merged 1 commit intothesofproject:mainfrom Feb 18, 2025
Merged
Conversation
Calculate and print percentage of cold text and data when building loadable modules. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
lgirdwood
approved these changes
Feb 17, 2025
Collaborator
Author
|
hm, I want a build log with xt-clang, so have to enable jenkins testing |
Collaborator
Author
|
SOFCI TEST |
kv2019i
reviewed
Feb 18, 2025
Collaborator
kv2019i
left a comment
There was a problem hiding this comment.
A few questions inline.
| size = module->text.size + cold_text_size; | ||
| rounded = ALIGN_UP(end, MAN_PAGE_SIZE) - start; | ||
| fprintf(stdout, | ||
| " module: text %zu (0x%zx) bytes, including %zu (0x%zx) %zu%% efficiency bytes\n", |
Member
There was a problem hiding this comment.
efficient memory i.e. not higher power SRAM
| fprintf(stdout, | ||
| "\tdata %zu (0x%zx) bytes, including %zu (0x%zx) %zu%% efficiency bytes\n", | ||
| size, size, cold_data_size, cold_data_size, | ||
| rounded ? (cold_data_size * 100 + rounded / 2) / rounded : 0); |
Collaborator
There was a problem hiding this comment.
This is not very obvious math here. with cold_data_size*100+bytes in nominator, seems like you are adding percentages to bytes here...?
Collaborator
Author
There was a problem hiding this comment.
@kv2019i rounding to the nearest integer :-)
Collaborator
There was a problem hiding this comment.
right, right, the example builds for this PR have it as all zeros, but indeed this is good.
kv2019i
approved these changes
Feb 18, 2025
| fprintf(stdout, | ||
| "\tdata %zu (0x%zx) bytes, including %zu (0x%zx) %zu%% efficiency bytes\n", | ||
| size, size, cold_data_size, cold_data_size, | ||
| rounded ? (cold_data_size * 100 + rounded / 2) / rounded : 0); |
Collaborator
There was a problem hiding this comment.
right, right, the example builds for this PR have it as all zeros, but indeed this is good.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Calculate and print percentage of cold text and data when building loadable modules.