Skip to content

Add debug symbols to release builds #2748

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

Closed
wants to merge 1 commit into from

Conversation

0xc0170
Copy link
Contributor

@0xc0170 0xc0170 commented Sep 20, 2016

Replaces #2139, adding more flags for ARMCC to make the output smaller, now it should be 2x bigger than usual (more info in the referenced pull request).

All toolchains now produces output folders with acceptable sizes. Please review

@bogdanm @sg- @meriac @bridadan @screamerbg

@0xc0170
Copy link
Contributor Author

0xc0170 commented Sep 20, 2016

/morph test

@bogdanm
Copy link
Contributor

bogdanm commented Sep 20, 2016

👍

@screamerbg
Copy link
Contributor

screamerbg commented Sep 20, 2016

Until the ARMCC huge size issues are resolved I can't endorse this, sorry. mbed library releases will be HUGE (200mb+ per target). Hence I think this should be switch to -o, e.g. mbed compile ... -o debug-symbols

@sg- @0xc0170

@screamerbg
Copy link
Contributor

Additionally, there should be a way to tell the build tools not to include the debug symbols, e.g. this patch makes it mandatory.

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 900

All builds and test passed!

@0xc0170
Copy link
Contributor Author

0xc0170 commented Sep 20, 2016

Until the ARMCC huge size issues are resolved I can't endorse this, sorry. mbed library releases will be HUGE (200mb+ per target). Hence I think this should be switch to -o, e.g. mbed compile ... -o debug-symbols

that does not sound correct, I have been testing this patch locally, I provided numbers in the earlier PR, that this does not increase size 10x as it was (-g), but for ARMCC the size increase is around ~2x. Here're mbed-os-example-blinky numbers: #2139 (comment)

mbed-lib (using python tools/build.py -m K64F -t ARM)
k64f ARM:

  • 5MB without --debug
  • 7MB with "--debug", "--dwarf3", "--no_debug_macros", "--remove_unneeded_entities"

nucle f411re ARM:

  • 4MB without --debug
  • 8MB "--debug", "--dwarf3", "--no_debug_macros", "--remove_unneeded_entities"

Additionally, there should be a way to tell the build tools not to include the debug symbols, e.g. this patch makes it mandatory.

What's the use case? the size of output is not that different, thus I don't think we need one more option for this to disable. I wouldn't want option for everything if really not required.

@meriac
Copy link
Contributor

meriac commented Sep 20, 2016

@screamerbg I agree with @0xc0170 - I would not add an option to suppress debug information as it will be required for our build time statics and the overhead is negligible. If someone needs that for confidentiality reasons, they can still run *-strip over the resulting elf file (which happens after outputting the statistics).

@bridadan
Copy link
Contributor

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@bridadan
Copy link
Contributor

I kicked off a test to see how it performs. I will be monitoring the CI machine just in case the size starts to explode.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Sep 20, 2016

One consideration would be the mbed-sdk releases and how mbed online IDE can handle this increase in size.

@screamerbg
Copy link
Contributor

@0xc0170 can you provide numbers/sizes with the current flags, e.g. no debug

@0xc0170
Copy link
Contributor Author

0xc0170 commented Sep 20, 2016

@0xc0170 can you provide numbers/sizes with the current flags, e.g. no debug

The comment above, for K64F and NUCLEO F411RE build mbed lib with and without debug flags for ARMCC, paste here again:

mbed-lib (using python tools/build.py -m K64F -t ARM)
k64f ARM:

  • 5MB without --debug
  • 7MB with "--debug", "--dwarf3", "--no_debug_macros", "--remove_unneeded_entities"

nucleo f411re ARM:

  • 4MB without --debug
  • 8MB "--debug", "--dwarf3", "--no_debug_macros", "--remove_unneeded_entities"

@mbed-bot
Copy link

[Build 951]
SUCCESS: Building succeeded and tests were run! Be sure to check the test results

@sg-
Copy link
Contributor

sg- commented Sep 20, 2016

We are planning to introduce compile profiles and this change can be introduced then.

@sg-
Copy link
Contributor

sg- commented Sep 28, 2016

@0xc0170 profile support PR is up. Lets get this effort reflected over on #2802

@sg- sg- closed this Sep 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants