google / bloaty

Bloaty: a size profiler for binaries
Apache License 2.0
4.66k stars 337 forks source link

incorrect TOTAL when diffing same binary #335

Open bence42 opened 1 year ago

bence42 commented 1 year ago

Since https://github.com/google/bloaty/pull/313/files (specifically https://github.com/google/bloaty/commit/7c5547aeac42917c0d58e19b77332cd07f122a02) the diff will incorrectly contain the new total size.

E.g

$ ./build/bloaty ./build/bloaty -- ./build/bloaty
    FILE SIZE        VM SIZE
 --------------  --------------
  +100% +7.30Mi  +100% +7.55Mi    TOTAL

Previously the report was correct:

$ bloaty /usr/bin/bloaty -- /usr/bin/bloaty
    FILE SIZE        VM SIZE
 --------------  --------------
  [ = ]       0  [ = ]       0    TOTAL

This make diff almost unusable because the actual TOTAL change is not calculated.