-
Notifications
You must be signed in to change notification settings - Fork 325
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
rimage: print cold data and text percentage #9837
Conversation
Calculate and print percentage of cold text and data when building loadable modules. Signed-off-by: Guennadi Liakhovetski <[email protected]>
hm, I want a build log with xt-clang, so have to enable jenkins testing |
SOFCI TEST |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"efficiency bytes" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not very obvious math here. with cold_data_size*100+bytes in nominator, seems like you are adding percentages to bytes here...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kv2019i rounding to the nearest integer :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, right, the example builds for this PR have it as all zeros, but indeed this is good.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, right, the example builds for this PR have it as all zeros, but indeed this is good.
Calculate and print percentage of cold text and data when building loadable modules.