From 003fb88afdead00a40dab4503c69f061ecf6ad4d Mon Sep 17 00:00:00 2001 From: Kyle Micallef Bonnici Date: Fri, 2 Feb 2024 17:32:52 +0100 Subject: [PATCH] scripts: footprint: fix node size computation fix issue with (no paths) != sum() In some cases it was observed that item were being added to the node_no_paths and these only had a path of ':' hence no node was ever added. This resulted in the size of (no paths) to not be equal to the sum of it's children. I am not sure if this size should be a child named of no paths or if this should be part of the node_hidden_syms. I assumed it should be part of node_hidden_syms Signed-off-by: Kyle Micallef Bonnici --- scripts/footprint/size_report | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/footprint/size_report b/scripts/footprint/size_report index c4d73b8e2d0..256b516cc38 100755 --- a/scripts/footprint/size_report +++ b/scripts/footprint/size_report @@ -735,6 +735,7 @@ def generate_any_tree(symbol_dict, total_size, path_prefix): # Need to account for code and data where there are not emitted # symbols associated with them. node_hidden_syms = TreeNode('(hidden)', "(hidden)", parent=root) + node_no_paths._size = sum_node_children_size(node_no_paths) node_hidden_syms._size = root._size - sum_node_children_size(root) return root