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

Usability improvements for non-crate mode #173

Open
therealprof opened this issue Jul 5, 2020 · 0 comments
Open

Usability improvements for non-crate mode #173

therealprof opened this issue Jul 5, 2020 · 0 comments

Comments

@therealprof
Copy link

therealprof commented Jul 5, 2020

Taken from @therealprof in #147 (comment)

The issues noted here can be seen from: stm32-rs/stm32f4xx-hal#159 (comment)

It doesn't quite yield the expected output though. ;)

This is the human-readable output:

File  .text   Size         Crate Name
0.3%  39.2% 1.2KiB    dwt_blinky dwt_blinky::__cortex_m_rt_main
0.3%  36.9% 1.1KiB           std __udivmoddi4
0.0%   5.2%   158B           std __aeabi_memset4
0.0%   3.9%   116B   cortex_m_rt Reset
0.0%   3.3%   100B stm32f4xx_hal stm32f4xx_hal::dwt::Delay::delay_ticks
0.0%   3.2%    96B           std __aeabi_memset
0.0%   2.4%    72B stm32f4xx_hal stm32f4xx_hal::dwt::StopWatch::lap_time
0.0%   1.6%    48B stm32f4xx_hal core::iter::traits::iterator::Iterator::min_by_key::key::{{closure}}
0.0%   0.7%    22B           std __aeabi_uldivmod
0.0%   0.3%    10B   cortex_m_rt ResetTrampoline
0.0%   0.3%    10B           std core::panicking::panic_fmt
0.0%   0.3%    10B           std core::panicking::panic_bounds_check
0.0%   0.3%    10B           std core::panicking::panic
0.0%   0.3%    10B     [Unknown] main
0.0%   0.2%     6B           std __aeabi_memclr4
0.0%   0.1%     2B   cortex_m_rt HardFault_
0.0%   0.1%     2B    panic_halt rust_begin_unwind
0.0%   0.1%     2B   cortex_m_rt DefaultPreInit
0.0%   0.1%     2B   cortex_m_rt DefaultHandler_
0.0%   0.0%     0B               And 0 smaller methods. Use -n N to show more.
0.9% 100.0% 2.9KiB               .text section size, the file size is 342.6KiB

Few things of note:

  • The toolchain is running on stable-x86_64-unknown-linux-gnu but the target is thumbv7em-none-eabihf (I would said the target is more important to know than the host architecture)
  • @@ Breakdown per crate @@ should probably be @@ Breakdown per function @@ if the function mode is enabled
  • It only lists the first two functions?
  • While the total file size might be interesting every now and the really interesting metric here is the code (or .text) size, the complete file size also contains debugging information and other data which may not even end up in memory when running the binary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant