3 # Parses the output of elf-size-report.awk and calculates segment memory usage deltas between the analyzed elf files.
5 # License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
6 # Copyright (c)2016 Maxim Paperno
7 # Copyright (c)2017 OpenTX
17 if ($
1 ==
"----" && NF > 5 && $
5 ~
/\.elf$
/) {
20 else if (tolower($
1) ~
/totals
/) {
24 else if (in_ttls
&& NF != 5) {
30 d
[elf_cnt
][$
1]["total"] = $
2;
34 printf("\n---- Comparing results of %d files ----\n\n", elf_cnt
);
35 PROCINFO
["sorted_in"] =
"@ind_num_asc"
37 if (length(fname
[j
-1]))
38 printf("file %d: %s\n", j
, fname
[j
-1])
40 printf("\n%-8s ", "Section");
42 printf("%8s ", "file " j
);
44 printf("(%7s) ", "\xCE\x94 vs f1");
46 printf("(%7s) ", "\xCE\x94 vs f" j
-1);
53 printf("%8.2f ", d
[j
][n
]["total"]);
55 printDelta
(d
[j
][n
]["total"] - d
[1][n
]["total"]);
57 printDelta
(d
[j
][n
]["total"] - d
[j
-1][n
]["total"]);
64 function printDelta
(dlta
) {
66 printf("(%+7.2f) ", dlta
);
68 printf("(%7s) ", "--.--");