Skip to content

Commit bba13dd

Browse files
committed
Replace in memap CSV report fields
Changes: * This change impacts #2047 * In code summary columns were shortened and names changed a bit, see [here](https://github.com/mbedmicro/mbed/pull/2047/files?w=1#diff-f9cb941bde5647a5763e18fc220efc51R410) * There is a need to allign memap CSV report fields (summary columns) with what is in code now. This discrapency may create problems when generating reports in the future. All columns should have the same name. * memap CSV sumamry fields names changes: 'total_static_ram' -> 'static_ram' 'allocated_heap' -> 'heap' 'allocated_stack' -> 'stack' See example of discrepancy: 'total_static_ram' vs 'static_ram' 'allocated_heap' vs 'heap' 'allocated_stack' vs 'stack' What is in code and presented with prettytable: +----------------------------------------+--------+-----------+------------+-------+-------+-----------+-------------+ | name | target | toolchain | static_ram | stack | heap | total_ram | total_flash | +----------------------------------------+--------+-----------+------------+-------+-------+-----------+-------------+ | tests-mbed_drivers-c_strings | K64F | GCC_ARM | 11468 | 32768 | 65540 | 109776 | 74182 | | tests-mbed_drivers-callback | K64F | GCC_ARM | 11980 | 32768 | 65540 | 110288 | 88406 | | tests-mbedmicro-rtos-mbed-threads | K64F | GCC_ARM | 11468 | 32768 | 65540 | 109776 | 75918 | | tests-mbedmicro-rtos-mbed-timer | K64F | GCC_ARM | 10788 | 32768 | 65540 | 109096 | 68534 | +----------------------------------------+--------+-----------+------------+-------+-------+-----------+-------------+ vs CSV: ``` total_static_ram,allocated_heap,allocated_stack,total_ram,total_flash 10788,65540,32768,109096,67486 ``` vs memstats_map.JSON: ```json [ { "module": "Fill", "size": { ".data": 4, ".bss": 2257, ".text": 173 } }, { "summary": { "total_flash": 67486, "allocated_stack": 32768, "total_static_ram": 10788, "total_ram": 109096, "allocated_heap": 65540 } } ] ```
1 parent e9d225b commit bba13dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/memap.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,16 +436,16 @@ def generate_output(self, export_format, file_output=None):
436436
csv_module_section += [i+k]
437437
csv_sizes += [self.modules[i][k]]
438438

439-
csv_module_section += ['total_static_ram']
439+
csv_module_section += ['static_ram']
440440
csv_sizes += [subtotal['.data']+subtotal['.bss']]
441441

442-
csv_module_section += ['allocated_heap']
442+
csv_module_section += ['heap']
443443
if subtotal['.heap'] == 0:
444444
csv_sizes += ['unknown']
445445
else:
446446
csv_sizes += [subtotal['.heap']]
447447

448-
csv_module_section += ['allocated_stack']
448+
csv_module_section += ['stack']
449449
if subtotal['.stack'] == 0:
450450
csv_sizes += ['unknown']
451451
else:

0 commit comments

Comments
 (0)