-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
Added GH Action to show FLASH diff using bloaty #23868
Conversation
FLASH Analysispx4_fmu-v5x
px4_fmu-v6x
|
I don't have a particular example at the moment, but it was related to this bug which was fixed later.
I agree that most RAM usage is in malloc(), but if someone prealloc data on the heap where they shouldn't it should be notified. |
Yes, that sounds reasonable. Bloaty does not seem to make any official releases anymore. So I will create a fork of https://github.com/carlosperate/bloaty-action next week and bump the used bloaty version to one of the recent commits in the bloaty repo.
This will be caught by bloaty. As an example, I have compiled the following https://gist.github.com/alexcekay/756864c1f8ace3db3b4fe34c8bf49da7 once with and once without
|
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: |
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.
Yes, please!
I also find the symbols size change helpful for comparison. FYI we have some helpers for bloaty in tree. https://github.com/PX4/PX4-Autopilot/blob/main/cmake/bloaty.cmake |
Solved Problem
Increase awareness of the impact of a code change on FLASH size. Allow developers to see exactly how much and where their change will increase FLASH usage.
Solution
Alternatives / Future
This is an initial working version that includes the following two boards:
If we want, we can easily add more boards in the future.
This version compiles 2 times for each board (1 compile before / 1 compile after) to create the diff. With two boards this results in 4 compiles, which is fast and only creates a small overhead. If we add many more boards, we should reuse the artifacts created by other jobs. However, this will increase the complexity of the code as an external script will need collect the artifacts from the base and current revisions and unpack them.
In addition bloaty has the tendency to detect non-existing remappings (like in the comment below) when there are no changes. In case of real changes the output is however really useful as can be for example seen here:
alexcekay#2