Skip to content

tools: Bring back memap output by default #6155

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
Closed

Conversation

geky
Copy link
Contributor

@geky geky commented Feb 21, 2018

Back due to popular demand (and because #5929 accidentally ended up in a patch release).

Now compile jobs print both the table and bars if available:

$ mbed compile -m K64F -t GCC_ARM
Building project mbed-os-prettyoutput (ARCH_PRO, GCC_ARM)
Scan: .
Scan: env
Scan: mbed
Scan: FEATURE_LWIP
Link: mbed-os-02
Elf2Bin: mbed-os-02
+---------------------------------+-------+-------+------+
| Module                          | .text | .data | .bss |
+---------------------------------+-------+-------+------+
| [fill]                          |   653 |    10 |   40 |
| [lib]/c.a                       | 25404 |  2208 |   56 |
| [lib]/gcc.a                     |  5508 |     0 |    0 |
| [lib]/m.a                       |  6735 |     1 |    0 |
| [lib]/misc                      |   296 |    12 |   28 |
| drivers/BusOut.o                |   388 |     0 |    0 |
| drivers/CAN.o                   |   442 |     0 |    0 |
| drivers/InterruptIn.o           |    20 |     0 |    0 |
| drivers/RawSerial.o             |   500 |     0 |    0 |
| drivers/Serial.o                |   144 |     0 |    0 |
| drivers/SerialBase.o            |   768 |     0 |    0 |
| drivers/Ticker.o                |   368 |     0 |    0 |
| drivers/Timeout.o               |   136 |     0 |    0 |
| drivers/Timer.o                 |   488 |     0 |    0 |
| drivers/TimerEvent.o            |   280 |     0 |    0 |
| drivers/UARTSerial.o            |   188 |     0 |    0 |
| events/equeue                   |   576 |     0 |  101 |
| features/frameworks             | 11491 |    69 |  420 |
| hal/mbed_critical_section_api.o |   210 |     0 |    2 |
| hal/mbed_gpio.o                 |   382 |     0 |    0 |
| hal/mbed_pinmap_common.o        |   374 |     0 |    0 |
| hal/mbed_sleep_manager.o        |   202 |     0 |    2 |
| hal/mbed_ticker_api.o           |  2068 |     0 |    0 |
| hal/mbed_us_ticker_api.o        |    76 |     4 |   64 |
| main.o                          |  1729 |     4 |  205 |
| platform/FileHandle.o           |   180 |     0 |    0 |
| platform/mbed_alloc_wrappers.o  |   216 |     0 |    0 |
| platform/mbed_assert.o          |    89 |     0 |    0 |
| platform/mbed_board.o           |   418 |     0 |    0 |
| platform/mbed_critical.o        |   383 |     0 |    4 |
| platform/mbed_error.o           |    56 |     0 |    1 |
| platform/mbed_retarget.o        |  3122 |   260 |  144 |
| platform/mbed_wait_api_rtos.o   |   148 |     0 |    0 |
| rtos/TARGET_CORTEX              | 18409 |   168 | 6061 |
| rtos/Thread.o                   |    56 |     0 |    4 |
| targets/TARGET_NXP              |  5793 |     4 |  244 |
| Subtotals                       | 88296 |  2740 | 7376 |
+---------------------------------+-------+-------+------+
Total Static RAM memory (data + bss): 10116 bytes
Total Flash memory (text + data): 91036 bytes
ROM [||||||||                                            ]  88.9KB/512KB
RAM [|||||||||||||||                                     ]   9.88KB/32KB
Image: BUILD/ARCH_PRO/GCC_ARM/mbed-os-02.bin

related #5929
release patch?
cc @screamerbg, @MarceloSalazar, @theotherjimmy

@MarceloSalazar
Copy link

MarceloSalazar commented Feb 21, 2018

@geky thanks
I'm curious why mbed-os is not shown as here:

+------------------+-------+-------+-------+
| Module           | .text | .data |  .bss |
+------------------+-------+-------+-------+
| [fill]           |    62 |     4 |  2513 |
| [lib]/libc.a     | 22434 |  2204 |    56 |
| [lib]/libgcc.a   |  3728 |     0 |     0 |
| [lib]/libm.a     |    88 |     0 |     0 |
| [lib]/libnosys.a |    32 |     0 |     0 |
| [lib]/misc       |   232 |     8 |    28 |
| main.o           |    56 |     0 |     4 |
| mbed-os/features |    42 |     0 |   184 |
| mbed-os/hal      |   450 |     0 |     8 |
| mbed-os/platform |  1252 |     4 |   269 |
| mbed-os/rtos     |  5955 |    24 |  6874 |
| mbed-os/targets  |  9788 |    12 |   384 |
| Subtotals        | 44119 |  2256 | 10320 |
+------------------+-------+-------+-------+

@geky
Copy link
Contributor Author

geky commented Feb 21, 2018

It's because I'm compiling inside the mbed-os directory. This matches the output from before #5929.

Now prints both the table and bars if available
@geky geky force-pushed the g-bring-back-memap branch from 93b1a5b to 54dca6b Compare February 21, 2018 19:50
@marcuschangarm
Copy link
Contributor

Memap!!

@cmonr
Copy link
Contributor

cmonr commented Feb 21, 2018

Is there a particular reason that the memmap table and the bars are printed by default? Is there any way to make the outputs not be printed?

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 22, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Feb 22, 2018

Build : SUCCESS

Build number : 1211
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6155/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@jeromecoutant
Copy link
Collaborator

Hi
Note that #5929 is not perfect for targets with 2 RAM...

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 22, 2018

Note that #5929 is not perfect for targets with 2 RAM...

Can you provide an issue report (how to reproduce it , what it outputs (correct/wrong) ?

@mbed-ci
Copy link

mbed-ci commented Feb 22, 2018

@mbed-ci
Copy link

mbed-ci commented Feb 22, 2018

@adbridge
Copy link
Contributor

/morph test

@mbed-ci
Copy link

mbed-ci commented Feb 22, 2018

@MarceloSalazar
Copy link

MarceloSalazar commented Feb 22, 2018

Can we understand and clarify the difference between these two statements for RAM and Flash, so developers don't get confused ?
91036 vs 88.9KB?
10116 vs 9.88KB?
I don't like the idea of showing different information.

  1. memap
Total Static RAM memory (data + bss): 10116 bytes
Total Flash memory (text + data): 91036 bytes
  1. Bars
ROM [||||||||                                            ]  88.9KB/512KB
RAM [|||||||||||||||                                     ]   9.88KB/32KB

Also for bars, I assume it shows static RAM, right?

@theotherjimmy
Copy link
Contributor

@MarceloSalazar What difference are you talking about?
9.88 KB * 1024B/KB ~= 10116 bytes
88.9KB * 1024B/KB ~= 91036 bytes

@geky
Copy link
Contributor Author

geky commented Feb 22, 2018

Ah it was the power-of-2 units. I was also confused.

Should we also print the tables totals using human readable units? That would probably avoid confusion.

@MarceloSalazar
Copy link

MarceloSalazar commented Feb 22, 2018

OK, let's make it more explicit ;-)
In summary, I'd suggest we stick to one way of showing info.

@geky
Copy link
Contributor Author

geky commented Feb 22, 2018

explicit? what do you mean?

@theotherjimmy
Copy link
Contributor

https://ux.stackexchange.com/questions/13815/files-size-units-kib-vs-kb-vs-kb

It seems that it is explicit already

@geky
Copy link
Contributor Author

geky commented Feb 22, 2018

Ah, do you mean we should use KiB? That's easy enough to change, although at this point it looks like we'll miss the next patch release (code freeze for 5.7.6 eod today).

@marcuschangarm
Copy link
Contributor

It in our style guide! https://docs.mbed.com/docs/writing-and-publishing-guides/en/latest/units/

@theotherjimmy
Copy link
Contributor

Well, it's official: an XKCD comic set a standard for units!

@marcuschangarm
Copy link
Contributor

Does that mean we are switching to Baker's Kilobyte? 😆

@theotherjimmy
Copy link
Contributor

theotherjimmy commented Feb 23, 2018

Only if the suffix is KBa. For those that don't like clicking links, or reading XKCD, a KBa is 1152 Bytes.

@screamerbg
Copy link
Contributor

@cmonr @geky @0xc0170 Can we get this in? I'd like the normal behavior restored ASAP.

@screamerbg
Copy link
Contributor

Or the bar patch reverted

@cmonr
Copy link
Contributor

cmonr commented Feb 23, 2018

@screamerbg Sure, but we need 1) @MarceloSalazar's comment about the sizing to be resolved, and 2) at least one person to approve this PR. Sound like you're willing to give this PR the ok as-is?

@screamerbg
Copy link
Contributor

@cmonr Would you like me to send a PR that reverts the bars PR entirely, or would you like to fix the output so it doesn't report in KB/MB/GB, but rather in bytes? E.g. https://github.com/ARMmbed/mbed-os/pull/5929/files#diff-f9cb941bde5647a5763e18fc220efc51R657

@cmonr
Copy link
Contributor

cmonr commented Feb 23, 2018

@screamerbg I can amend this PR to get the output size inline with what we had before.

@screamerbg
Copy link
Contributor

@cmonr Great, thanks. What will be the release tag for this?

@geky
Copy link
Contributor Author

geky commented Feb 23, 2018

Was about to change KB->KiB but saw there's been a bunch of discussion. What's the plan for this pr? Do you need me to not touch it?

@screamerbg
Copy link
Contributor

@geky please discuss with @cmonr

@geky
Copy link
Contributor Author

geky commented Feb 23, 2018

Simple revert: #6197

@geky
Copy link
Contributor Author

geky commented Feb 23, 2018

Tabling this for now (pun not intended)

@geky geky closed this Feb 23, 2018
@cmonr
Copy link
Contributor

cmonr commented Feb 23, 2018

Work has been moved to #6197.

@geky geky deleted the g-bring-back-memap branch April 20, 2018 16:26
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

Successfully merging this pull request may close these issues.

10 participants