Skip to content

Commit a3a2cf3

Browse files
show all stack deltas, not positives ones only
1 parent 7c66542 commit a3a2cf3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/build_all_c_apps.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -664,8 +664,8 @@ jobs:
664664
665665
with open(OUT, 'w') as out:
666666
out.write(f'# Stack usage comparison: {APP}\n\n')
667-
out.write('Symbols where **clang-21 (custom)** stack > **clang-14 (official)** stack.\n\n')
668-
out.write('Only functions with a positive delta are listed.\n\n')
667+
out.write('Functions whose stack usage differs between **clang-14 (official)** and **clang-21 (custom)**.\n\n')
668+
out.write('Only functions with a non-zero delta are listed, sorted by delta (descending).\n\n')
669669
670670
found_any = False
671671
for dev_key, dev_name in DEVICES:
@@ -679,7 +679,7 @@ jobs:
679679
old_sz = old_data.get(func, 0)
680680
new_sz = new_data.get(func, 0)
681681
delta = new_sz - old_sz
682-
if delta > 0:
682+
if delta != 0:
683683
rows.append((func, old_sz, new_sz, delta))
684684
rows.sort(key=lambda x: x[3], reverse=True)
685685
@@ -691,8 +691,9 @@ jobs:
691691
out.write('| Function | clang-14 (bytes) | clang-21 (bytes) | Δ (bytes) |\n')
692692
out.write('|----------|-----------------|-----------------|----------|\n')
693693
for func, old_sz, new_sz, delta in rows:
694-
pct = f' (+{delta/old_sz*100:.1f}%)' if old_sz else ''
695-
out.write(f'| `{func}` | {old_sz} | {new_sz} | +{delta}{pct} |\n')
694+
sign = '+' if delta > 0 else ''
695+
pct = f' ({sign}{delta/old_sz*100:.1f}%)' if old_sz else ''
696+
out.write(f'| `{func}` | {old_sz} | {new_sz} | {sign}{delta}{pct} |\n')
696697
out.write('\n')
697698
out.write('---\n\n')
698699

0 commit comments

Comments
 (0)