New issue
Advanced search Search tips

Issue 733053 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

supersize diff reports inconsistent numbers for .text size change when comparing gcc & clang

Project Member Reported by agrieve@chromium.org, Jun 14 2017

Issue description

Repro:

1. build with gcc
2. build with clang
3. run "supersize archive" on them both, and then "supersize diff"

This shows:
Section Sizes (Total=-280kb (-287355 bytes)):
    .bss: 10.2kb (10496 bytes) (not included in totals)
    .data: -52.6kb (-53912 bytes) (18.8%)
    .data.rel.ro: 816kb (835584 bytes) (-290.8%)
    .data.rel.ro.local: -806kb (-825344 bytes) (287.2%)
    .rel.dyn: 14.6kb (14944 bytes) (-5.2%)
    .rodata: -53.6kb (-54856 bytes) (19.1%)
    .text: -205kb (-210236 bytes) (73.2%)

Showing 409,640 symbols (323,590 unique) with total pss: -1229674 bytes
.text=-1.08mb    .rodata=-53.0kb    .data*=-42.5kb    .bss=10.7kb     total=-1.17mb
Number of unique paths: 14920


Clearly, .text=-1.08mb is wrong.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/89f066e7d382f7f2f9e74b1afbe1fcf1649615cf

commit 89f066e7d382f7f2f9e74b1afbe1fcf1649615cf
Author: agrieve <agrieve@chromium.org>
Date: Thu Jun 15 20:14:56 2017

supersize: Rewrite diff logic and a few display tweaks

The prior diff logic tried to make sense of symbol aliases by
putting the diffed symbols in the same alias groups as the
after_symbols. However, this approach does not work when
a symbol from one alias group changes to have a different
set of aliases in the after group.

Now, all symbols within a diff have no aliases, but instead
contain pointers to the before & after symbols. Additionally,
each diff'ed symbol now also tracks its own diff_status (rather
than this information being stored in the containing group.

Both of these changes simplify the logic, as well as allow for some
more advanced queries. (e.g. filter for symbols where number of
aliases has changed)

BUG= 733053 

Review-Url: https://codereview.chromium.org/2936033002
Cr-Commit-Position: refs/heads/master@{#479805}

[modify] https://crrev.com/89f066e7d382f7f2f9e74b1afbe1fcf1649615cf/tools/binary_size/libsupersize/console.py
[modify] https://crrev.com/89f066e7d382f7f2f9e74b1afbe1fcf1649615cf/tools/binary_size/libsupersize/describe.py
[modify] https://crrev.com/89f066e7d382f7f2f9e74b1afbe1fcf1649615cf/tools/binary_size/libsupersize/diff.py
[modify] https://crrev.com/89f066e7d382f7f2f9e74b1afbe1fcf1649615cf/tools/binary_size/libsupersize/file_format.py
[modify] https://crrev.com/89f066e7d382f7f2f9e74b1afbe1fcf1649615cf/tools/binary_size/libsupersize/integration_test.py
[modify] https://crrev.com/89f066e7d382f7f2f9e74b1afbe1fcf1649615cf/tools/binary_size/libsupersize/models.py
[modify] https://crrev.com/89f066e7d382f7f2f9e74b1afbe1fcf1649615cf/tools/binary_size/libsupersize/testdata/Archive.golden
[modify] https://crrev.com/89f066e7d382f7f2f9e74b1afbe1fcf1649615cf/tools/binary_size/libsupersize/testdata/Archive_Elf.golden
[modify] https://crrev.com/89f066e7d382f7f2f9e74b1afbe1fcf1649615cf/tools/binary_size/libsupersize/testdata/Archive_OutputDirectory.golden
[modify] https://crrev.com/89f066e7d382f7f2f9e74b1afbe1fcf1649615cf/tools/binary_size/libsupersize/testdata/Console.golden
[modify] https://crrev.com/89f066e7d382f7f2f9e74b1afbe1fcf1649615cf/tools/binary_size/libsupersize/testdata/Diff_Basic.golden
[modify] https://crrev.com/89f066e7d382f7f2f9e74b1afbe1fcf1649615cf/tools/binary_size/libsupersize/testdata/Diff_NullDiff.golden
[modify] https://crrev.com/89f066e7d382f7f2f9e74b1afbe1fcf1649615cf/tools/binary_size/libsupersize/testdata/FullDescription.golden
[modify] https://crrev.com/89f066e7d382f7f2f9e74b1afbe1fcf1649615cf/tools/binary_size/libsupersize/testdata/SymbolGroupMethods.golden

Status: Fixed (was: Started)

Sign in to add a comment