Lines Matching +full:row +full:- +full:size

3 # Copyright (c) 2016, 2020-2024 Intel Corporation
5 # SPDX-License-Identifier: Apache-2.0
11 Process an ELF file to generate size report on RAM and ROM.
49 DT_LOCATION = re.compile(r"\(DW_OP_addr: ([0-9a-f]+)\)")
60 """Get the size of a symbol"""
143 # Ignore symbols with size == 0
189 sec_end = sec_start + (sec_size - 1 if sec_size else 0)
191 f"0x{sec_start:08x}-0x{sec_end:08x} "
192 f"{descr} '{section.name}': size={sec_size}, "
211 size = section['sh_size']
213 sec_end = sec_start + (size - 1 if size else 0)
220 ram_size += size
230 rom_size += size
238 rom_size += size
240 ram_size += size
247 rom_size += size
254 unassigned_size += size
268 file_entry = lineprog['file_entry'][file_index - 1]
274 directory = lineprog.header['include_directory'][dir_index - 1]
288 # built-ins can't be resolved, so it's not an issue
289 if '<built-in>' not in str(path):
576 …def __init__(self, name, identifier, size=0, parent=None, children=None, address=None, section=Non… argument
579 self._size = size
595 Calculate the sum of symbol size of all direct children.
597 size = 0
600 size += child._size
602 return size
629 # A set of helper function for building a simple tree with a path-like
631 def _insert_one_elem(root, path, size, addr, section): argument
645 # Passing down through a non-terminal parent node.
647 parent._size += size
651 node = TreeNode(name=str(part), identifier=cur, size=size, parent=parent)
656 node = TreeNode(name=str(part), identifier=cur, size=size, parent=parent)
659 # Don't do it on file- and directory- level parent nodes.
664 print(f"ERROR: no end node created for {root}, {path}, 0x{addr:08x}+{size}@{section}")
680 size = get_symbol_size(symbol['symbol'])
700 _insert_one_elem(dest_node, path, size, addr, section)
704 # ZEPHYR_BASE and OUTPUT_DIR nodes don't have sum of symbol size
731 node_hidden_syms._size = root._size - sum_node_children_size(root)
748 Fore.YELLOW + "Path", "Size", "%", " Address", "Section" + Fore.RESET))
750 for row in RenderTree(root, childiter=node_sort, maxlevel=depth):
751 f = len(row.pre) + len(row.node._name)
752 s = str(row.node._size).rjust(100-f)
753 percent = 100 * float(row.node._size) / float(total_size)
755 hex_addr = "-"
758 if not row.node.children:
759 if hasattr(row.node, 'section'):
760 section_name = row.node.section
761 if hasattr(row.node, 'address'):
762 hex_addr = "0x{:08x}".format(row.node.address)
765 elif row.node._name.endswith(SRC_FILE_EXT):
769 …print(f"{row.pre}{cc}{row.node._name} {s} {cr}{Fore.BLUE}{percent:6.2f}%{Fore.RESET} {hex_addr} {…
782 parser.add_argument("-k", "--kernel", required=True,
784 parser.add_argument("-z", "--zephyrbase", required=True,
786 parser.add_argument("-q", "--quiet", action="store_true",
788 parser.add_argument("-o", "--output", required=True,
790 parser.add_argument("-w", "--workspace", default=None,
793 parser.add_argument("-d", "--depth", dest="depth",
797 parser.add_argument("-v", "--verbose", action="store_true",
799 parser.add_argument("--json", help="store results in a JSON file.")
809 sys.stdout.reconfigure(encoding='utf-8')