Giter Site home page Giter Site logo

-d inlines doesn't work about bloaty HOT 11 CLOSED

google avatar google commented on May 22, 2024
-d inlines doesn't work

from bloaty.

Comments (11)

haberman avatar haberman commented on May 22, 2024

Can you attach your a.out? I can't reproduce this. On my system I get:

# uname -a
Linux 2e6f906813a8 4.4.20-moby #1 SMP Thu Sep 15 12:10:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
# echo "int main(){}" | g++ -g -x c++ - && ./bloaty -d inlines ./a.out
     VM SIZE                 FILE SIZE
 --------------           --------------
 100.0%  4.00Mi <stdin>:1  1.24Ki  13.7%
   0.0%     996 [None]     7.83Ki  86.3%
 100.0%  4.00Mi TOTAL      9.07Ki 100.0%

Those results are suspect, but it's not the same as the error you got.

from bloaty.

octoploid avatar octoploid commented on May 22, 2024

a.out.gz

from bloaty.

froydnj avatar froydnj commented on May 22, 2024

I saw the same error after running bloaty for over an hour on Firefox's libxul.so.

from bloaty.

haberman avatar haberman commented on May 22, 2024

Thanks for the reports -- I've been able to reproduce this now, and am working on a fix as we speak.

from bloaty.

octoploid avatar octoploid commented on May 22, 2024

Thanks for the fix. However it now produces "bogus" output for me:

 % ./bloaty -d inlines bloaty
     VM SIZE                                    FILE SIZE
 --------------                              --------------
   2.4%   111Ki [None]                        8.45Mi  95.7%
  89.4%  4.01Mi ../sysdeps/x86_64start.S:63   14.8Ki   0.2%
   8.1%   373Ki ../sysdeps/x86_64crti.S:69     373Ki   4.1%
   0.0%       7 ../sysdeps/x86_64start.S:107       7   0.0%
   0.0%       7 ../sysdeps/x86_64start.S:108       7   0.0%
   0.0%       7 ../sysdeps/x86_64start.S:110       7   0.0%
   0.0%       6 ../sysdeps/x86_64start.S:120       6   0.0%
   0.0%       4 ../sysdeps/x86_64crti.S:80         4   0.0%
   0.0%       4 ../sysdeps/x86_64crtn.S:44         4   0.0%
   0.0%       4 ../sysdeps/x86_64start.S:90        4   0.0%
   0.0%       3 ../sysdeps/x86_64start.S:79        3   0.0%
   0.0%       3 ../sysdeps/x86_64start.S:88        3   0.0%
   0.0%       1 ../sysdeps/x86_64crtn.S:45         1   0.0%
   0.0%       1 ../sysdeps/x86_64start.S:122       1   0.0%
   0.0%       1 ../sysdeps/x86_64start.S:85        1   0.0%
   0.0%       1 ../sysdeps/x86_64start.S:93        1   0.0%
   0.0%       1 ../sysdeps/x86_64start.S:97        1   0.0%
 100.0%  4.49Mi TOTAL                         8.83Mi 100.0%

from bloaty.

haberman avatar haberman commented on May 22, 2024

Whoops, clearly I need some better tests for this.

from bloaty.

haberman avatar haberman commented on May 22, 2024

Hmm, I can't reproduce your results. Here's what I get on my system:

$ ./bloaty bloaty -d inlines
     VM SIZE                                                                                        FILE SIZE
 --------------                                                                                  --------------
  27.1%   124Ki [None]                                                                            7.11Mi  95.6%
  55.1%   254Ki [Other]                                                                            254Ki   3.3%
   1.8%  8.34Ki /usr/include/c++/4.8ostream:535                                                   8.34Ki   0.1%
   1.6%  7.57Ki /usr/include/c++/4.8/bitsbasic_ios.h:456                                          7.57Ki   0.1%
   1.4%  6.66Ki /usr/include/c++/4.8/bitsbasic_string.h:539                                       6.66Ki   0.1%
   1.3%  6.19Ki /usr/include/c++/4.8streambuf:466                                                 6.19Ki   0.1%
   1.2%  5.48Ki /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/extatomicit  5.48Ki   0.1%
   1.0%  4.64Ki /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/extatomicit  4.64Ki   0.1%
   1.0%  4.60Ki /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bitsmove.h:  4.60Ki   0.1%
   0.9%  4.34Ki /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bitsmove.h:  4.34Ki   0.1%
   0.9%  4.28Ki /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bitsbasic_s  4.28Ki   0.1%
   0.8%  3.80Ki /usr/include/c++/4.8/bitsbasic_string.h:249                                       3.80Ki   0.0%
   0.8%  3.58Ki /usr/include/c++/4.8/bitsbasic_ios.h:276                                          3.58Ki   0.0%
   0.7%  3.38Ki /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bitsbasic_s  3.38Ki   0.0%
   0.7%  3.20Ki /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bitsbasic_s  3.20Ki   0.0%
   0.6%  2.92Ki /usr/include/c++/4.8/bitsbasic_string.h:583                                       2.92Ki   0.0%
   0.6%  2.89Ki /usr/include/c++/4.8ostream:385                                                   2.89Ki   0.0%
   0.6%  2.69Ki /usr/include/c++/4.8/bitschar_traits.h:271                                        2.69Ki   0.0%
   0.6%  2.66Ki /usr/include/c++/4.8/bitsbasic_string.h:240                                       2.66Ki   0.0%
   0.6%  2.57Ki /usr/include/c++/4.8ostream:93                                                    2.57Ki   0.0%
   0.5%  2.49Ki /usr/include/c++/4.8sstream:424                                                   2.49Ki   0.0%
 100.0%   461Ki TOTAL                                                                             7.44Mi 100.0%

Can you attach the file that causes this output?

from bloaty.

haberman avatar haberman commented on May 22, 2024

What system are you working on, by the way?

from bloaty.

octoploid avatar octoploid commented on May 22, 2024

I'm running Linux. And the output of "-d inlines" is always the same no matter what binary is used.
a.out.gz

from bloaty.

octoploid avatar octoploid commented on May 22, 2024

Thanks it work fine now.
One additional nit: There is a missing / in the output, e.g.:

markus@x4 7.0.0 % bloaty -d inlines ./cc1plus
     VM SIZE                                            FILE SIZE
 --------------                                      --------------
  42.8%  12.1Mi [None]                                 181Mi  91.8%
  47.8%  13.6Mi [Other]                               13.6Mi   6.9%
   2.2%   649Ki ../../gcc/gcctree.h:3159               649Ki   0.3%
   1.5%   442Ki ../../gcc/gcctree.h:3158               442Ki   0.2%
   1.2%   353Ki ../../gcc/gcctree.h:3045               353Ki   0.2%
   0.7%   208Ki ../../gcc/gcctree.h:3168               208Ki   0.1%
   0.5%   136Ki ../../gcc/gcctree.h:3167               136Ki   0.1%
   0.5%   130Ki ../../gcc/gcctree.h:3044               130Ki   0.1%
   0.4%   103Ki ../../gcc/gccvec.h:732                 103Ki   0.1%
   0.3%  99.1Ki ../../gcc/gcctree.h:3545              99.1Ki   0.0%
   0.3%  92.2Ki .genrtl.h:29                          92.2Ki   0.0%
   0.3%  80.1Ki ../../gcc/gcctree.h:3245              80.1Ki   0.0%
   0.2%  60.7Ki ../../gcc/gccgimple-match-head.c:780  60.7Ki   0.0%
   0.2%  50.5Ki ../../gcc/gcctree.h:3214              50.5Ki   0.0%
   0.2%  47.6Ki ../../gcc/gcctree.h:3246              47.6Ki   0.0%
   0.2%  47.0Ki ../../gcc/gcctree.h:3248              47.0Ki   0.0%
   0.2%  46.0Ki ../../gcc/gccvec.h:1069               46.0Ki   0.0%
   0.1%  43.2Ki ../../gcc/gcctree.h:3531              43.2Ki   0.0%
   0.1%  39.7Ki ../../gcc/gcctree.h:3244              39.7Ki   0.0%
   0.1%  38.4Ki .genrtl.h:33                          38.4Ki   0.0%
   0.1%  38.3Ki ../../gcc/gccvec.h:288                38.3Ki   0.0%
 100.0%  28.3Mi TOTAL                                  197Mi 100.0%

Should be ../../gcc/gcc/tree.h:3159 not ../../gcc/gcctree.h:3159 .

from bloaty.

haberman avatar haberman commented on May 22, 2024

Ah yes. I've just pushed a fix for that.

from bloaty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.