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

Make CI be able to use binary_elf_size_diff.py and report results. #37583

Open
4 tasks
andy31415 opened this issue Feb 14, 2025 · 0 comments
Open
4 tasks

Make CI be able to use binary_elf_size_diff.py and report results. #37583

andy31415 opened this issue Feb 14, 2025 · 0 comments

Comments

@andy31415
Copy link
Contributor

We currently have tooling that can do a reasonable diff actual flash changes for code. see
https://project-chip.github.io/connectedhomeip-doc/scripts/tools/ELF_SIZE_TOOLING.html

Overall a report looks like:

> ./scripts/tools/binary_elf_size_diff.py \
  ./out/qpg-qpg6105-light/chip-qpg6105-lighting-example.out \
  ./out/qpg-master.out

Type       Size  Function
-------  ------  -----------------------------------------------------------------------------------------------------------------------
CHANGED    -128  chip::app::CodegenDataModelProvider::WriteAttribute(chip::app::DataModel::WriteAttributeRequest const&, chip::app::A...
CHANGED     -76  chip::app::InteractionModelEngine::CheckCommandExistence(chip::app::ConcreteCommandPath const&, chip::app::DataModel...
CHANGED     -74  chip::app::reporting::Engine::CheckAccessDeniedEventPaths(chip::TLV::TLVWriter&, bool&, chip::app::ReadHandler*)
REMOVED     -58  chip::app::DataModel::EndpointFinder::EndpointFinder(chip::app::DataModel::ProviderMetadataTree*)
REMOVED     -44  chip::app::DataModel::EndpointFinder::Find(unsigned short)
CHANGED      18  chip::app::WriteHandler::WriteClusterData(chip::Access::SubjectDescriptor const&, chip::app::ConcreteDataAttributePa...
ADDED       104  chip::app::DataModel::ValidateClusterPath(chip::app::DataModel::ProviderMetadataTree*, chip::app::ConcreteClusterPat...
ADDED       224  chip::app::WriteHandler::CheckWriteAllowed(chip::Access::SubjectDescriptor const&, chip::app::ConcreteDataAttributeP...
TOTAL       -34

What we would need is for some targets (usually small arm targets, QPG would be a candidate however other platforms could be used to ... just make sure it is arm and not a linux target):

  • compile with the patch (already done)
  • save the compiled elf file as a "after changes" copy
  • revert the PR patch and compile again
  • compare "after changes" with the reverted version, to display the size delta

This would allow us to understand the scope of a change within the main binary, outside our current flash diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant