Coder Social home page Coder Social logo

bloaty broken on ubuntu 22.04 about bloaty HOT 3 CLOSED

jbulow avatar jbulow commented on July 26, 2024
bloaty broken on ubuntu 22.04

from bloaty.

Comments (3)

moncefmechri avatar moncefmechri commented on July 26, 2024

I'm seeing the same behavior. -d compileunits seems broken and prints (part of) unmangled symbols instead of filenames.

The application studied is a large, statically-linked C++20 Linux x86_64 debug binary, built using GCC 12. Bloaty has been built from source today, also with GCC 12.

from bloaty.

moncefmechri avatar moncefmechri commented on July 26, 2024

The issue for me seems to occur when the application studied is built with GCC 12. Taking bloaty as an example:

Built with GCC 12:

$ ./bloaty -d compileunits ./bloaty
    FILE SIZE        VM SIZE
 --------------  --------------
  35.6%  13.8Mi  45.0%  3.06Mi    [168 Others]
  15.0%  5.80Mi   0.0%       0    [section .debug_loclists]
  11.7%  4.52Mi   3.6%   254Ki    w> >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(const bloaty::RollupRow&, const bloaty::RollupRow&)> >
   5.1%  1.99Mi   3.0%   211Ki    ZN6bloaty7Options17set_verbose_levelEi
   3.9%  1.50Mi   1.3%  88.1Ki    2_EEEC4Ev
   3.0%  1.14Mi   4.9%   338Ki    _EENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISD_EE12_M_check_lenEmPKc
   2.9%  1.13Mi   0.0%       0    [section .debug_rnglists]
   0.8%   307Ki  15.7%  1.07Mi    ar> >&, std::vector<std::__cxx11::basic_string<char> >*, bloaty::Rollup*) const::PerThreadData*>
   2.5%   999Ki   1.3%  92.3Ki    S7_JS7_EEEvPT_DpOT0_
   2.4%   936Ki   0.5%  34.8Ki    ly<bool (*)(const re2::StringPiece&, const re2::RE2&, const re2::RE2::Arg* const*, int), re2::StringPiece>
   2.3%   923Ki  11.8%   820Ki    D2Ev
   1.8%   709Ki   1.5%   101Ki    12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implC2Ev
   1.7%   678Ki   0.9%  62.0Ki    5_ESaIS8_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS8_E
   1.6%   622Ki   0.7%  46.9Ki    cewise_construct_tSt5tupleIJRS7_EESQ_IJEEEEERSK_DpOT_
   1.5%   614Ki   0.4%  30.2Ki    9__gnu_cxx17__normal_iteratorIPS3_S5_EET_SN_St12__false_type
   1.5%   596Ki   0.4%  30.3Ki    7__normal_iteratorIPS7_S9_EEDpOT_
   1.5%   585Ki   0.6%  42.3Ki    char_traitsIcESaIcEEEEC2Ev
   1.3%   528Ki   6.2%   432Ki    ollupRow>
   1.3%   520Ki   1.3%  89.1Ki    cxx::__normal_iterator<bloaty::RollupRow*, std::vector<bloaty::RollupRow> >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(const bloaty::RollupRow&, const bloaty::RollupRow&)> >
   1.3%   519Ki   0.4%  28.6Ki    12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED4Ev
   1.2%   491Ki   0.6%  42.7Ki    sl16strings_internal8SplitterINS7_6ByCharENS7_10AllowEmptyES3_E18ConvertToContainerIS5_S3_Lb0EEclERKSC_E8raw_viewEEvN9__gnu_cxx17__normal_iteratorIPS3_S5_EET_SN_St12__false_type
 100.0%  38.7Mi 100.0%  6.81Mi    TOTAL

Built with GCC 10:

$ ./bloaty -d compileunits ./bloaty
    FILE SIZE        VM SIZE
 --------------  --------------
  36.1%  17.4Mi  49.1%  3.35Mi    [165 Others]
  15.1%  7.26Mi   3.5%   241Ki    /home/mmechri/coding/bloaty-gcc10/third_party/protobuf/src/google/protobuf/descriptor.cc
   6.9%  3.33Mi   2.8%   195Ki    /home/mmechri/coding/bloaty-gcc10/third_party/protobuf/src/google/protobuf/descriptor.pb.cc
   5.2%  2.49Mi   4.9%   343Ki    /home/mmechri/coding/bloaty-gcc10/third_party/capstone/arch/ARM/ARMDisassembler.c
   4.8%  2.29Mi   1.2%  83.2Ki    /home/mmechri/coding/bloaty-gcc10/third_party/protobuf/src/google/protobuf/text_format.cc
   3.2%  1.56Mi   1.2%  87.1Ki    /home/mmechri/coding/bloaty-gcc10/third_party/protobuf/src/google/protobuf/generated_message_reflection.cc
   2.8%  1.33Mi   0.5%  34.2Ki    /home/mmechri/coding/bloaty-gcc10/third_party/protobuf/src/google/protobuf/descriptor_database.cc
   2.5%  1.21Mi   0.9%  62.9Ki    /home/mmechri/coding/bloaty-gcc10/third_party/protobuf/src/google/protobuf/extension_set.cc
   2.3%  1.12Mi   0.4%  29.7Ki    /home/mmechri/coding/bloaty-gcc10/third_party/protobuf/src/google/protobuf/generated_message_util.cc
   1.3%   631Ki  15.6%  1.07Mi    /home/mmechri/coding/bloaty-gcc10/third_party/capstone/arch/M68K/M68KDisassembler.c
   2.2%  1.06Mi   0.7%  46.2Ki    /home/mmechri/coding/bloaty-gcc10/third_party/protobuf/src/google/protobuf/wire_format.cc
   2.1%  1012Ki   1.0%  67.2Ki    /home/mmechri/coding/bloaty-gcc10/third_party/capstone/arch/Mips/MipsDisassembler.c
   2.0%   980Ki   1.3%  87.4Ki    /home/mmechri/coding/bloaty-gcc10/third_party/capstone/arch/AArch64/AArch64Disassembler.c
   1.9%   948Ki   1.1%  76.2Ki    /home/mmechri/coding/bloaty-gcc10/third_party/capstone/arch/SystemZ/SystemZDisassembler.c
   1.9%   936Ki  11.7%   820Ki    /home/mmechri/coding/bloaty-gcc10/third_party/capstone/arch/X86/X86Mapping.c
   1.7%   853Ki   1.5%   103Ki    /home/mmechri/coding/bloaty-gcc10/src/bloaty.cc
   1.7%   841Ki   0.5%  37.9Ki    /home/mmechri/coding/bloaty-gcc10/third_party/re2/re2/re2.cc
   1.6%   781Ki   0.4%  29.0Ki    /home/mmechri/coding/bloaty-gcc10/third_party/protobuf/src/google/protobuf/message.cc
   1.6%   766Ki   0.7%  47.8Ki    /home/mmechri/coding/bloaty-gcc10/third_party/protobuf/src/google/protobuf/repeated_field.cc
   1.5%   752Ki   0.6%  42.9Ki    /home/mmechri/coding/bloaty-gcc10/third_party/protobuf/src/google/protobuf/map_field.cc
   1.5%   730Ki   0.4%  28.0Ki    /home/mmechri/coding/bloaty-gcc10/third_party/re2/re2/dfa.cc
 100.0%  48.0Mi 100.0%  6.82Mi    TOTAL

Given that recent GCCs default to DWARF 5, I tried to build with GCC 12 while generating DWARF 4 debug info by passing -gdwarf-4, but this raises a new error:

$ ./bloaty -d compileunits ./bloaty
bloaty: Overflow in vm range, vmaddr=18383370559946752, vmsize=18428360703149604864

from bloaty.

moncefmechri avatar moncefmechri commented on July 26, 2024

I confirm #357 fixes the issue for me.

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.