Comments (4)
I don't quite follow. Section names aren't hierarchical; they don't have multiple "levels". Am I missing something?
Could you give an example of the output you're getting and the output you would like to be getting?
from bloaty.
So here is some output I'm getting:
> bloaty.exe -s vm someElf.axf
VM SIZE FILE SIZE
-------------- --------------
83.9% 117Ki .text 117Ki 16.4%
12.7% 17.9Ki [Unmapped] 40.8Ki 5.7%
1.5% 2.10Ki .bss 0 0.0%
1.1% 1.48Ki .data 1.48Ki 0.2%
0.6% 840 .ARM.exidx 840 0.1%
0.2% 288 .ARM.extab 288 0.0%
0.1% 148 [ELF Headers] 1.04Ki 0.1%
0.0% 0 .ARM.attributes 46 0.0%
0.0% 0 .comment 224 0.0%
0.0% 0 .debug_abbrev 23.8Ki 3.3%
0.0% 0 [Other] 532Ki 74.1%
100.0% 140Ki TOTAL 719Ki 100.0%
And here is a piece of the map file:
...
.text 0x00019a14 0x57d8 c:/siliconlabs/simplicitystudio/v3/developer/toolchains/gnu_arm/4.8_2013q4/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/lib/armv7e-m/softfp\libstdc++_s.a(cp-demangle.o)
0x0001f10c __cxa_demangle
0x0001f1d0 __gcclibcxx_demangle_callback
.text.fmod 0x0001f1ec 0xb4 c:/siliconlabs/simplicitystudio/v3/developer/toolchains/gnu_arm/4.8_2013q4/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/lib/armv7e-m/softfp\libm.a(lib_a-w_fmod.o)
0x0001f1ec fmod
.text.pow 0x0001f2a0 0x2f4 c:/siliconlabs/simplicitystudio/v3/developer/toolchains/gnu_arm/4.8_2013q4/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/lib/armv7e-m/softfp\libm.a(lib_a-w_pow.o)
0x0001f2a0 pow
.text.__ieee754_fmod
0x0001f594 0x27c c:/siliconlabs/simplicitystudio/v3/developer/toolchains/gnu_arm/4.8_2013q4/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/lib/armv7e-m/softfp\libm.a(lib_a-e_fmod.o)
0x0001f594 __ieee754_fmod
.text.__ieee754_pow
0x0001f810 0xa88 c:/siliconlabs/simplicitystudio/v3/developer/toolchains/gnu_arm/4.8_2013q4/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/lib/armv7e-m/softfp\libm.a(lib_a-e_pow.o)
0x0001f810 __ieee754_pow
...
Those are just some sections loaded from standard libraries but there are also sections for code that I've written. That is...
.text._ZN11DataManager8writeLogEPKcs
0x00017104 0xa0 ./src/DataManager.o
0x00017104 DataManager::writeLog(char const*, short)
.text._ZN11DataManager11loadNextLogEPKc
0x000171a4 0x14c ./src/DataManager.o
0x000171a4 DataManager::loadNextLog(char const*)
.text._ZN11DataManager14releaseNextLogEv
0x000172f0 0x130 ./src/DataManager.o
0x000172f0 DataManager::releaseNextLog()
.text._ZN11DataManagerC2EPKcPc
0x00017420 0x240 ./src/DataManager.o
0x00017420 DataManager::DataManager(char const*, char*)
0x00017420 DataManager::DataManager(char const*, char*)
What I'd like to get is something like this (I only filled in the VM size and names)
VM SIZE FILE SIZE
-------------- --------------
83.9% 117Ki .text 117Ki 16.4%
576 .text._ZN11DataManagerC2EPKcPc
332 .text._ZN11DataManager11loadNextLogEPKc
304 .text._ZN11DataManager14releaseNextLogEv
160 .text._ZN11DataManager8writeLogEPKcs
I guess my assumption was that this info was like this in the elf file but doing some poking around with objdump, it seems I want something that is a combination of the section and symbol tables. Hmmm.
from bloaty.
Hmm, I'm not familiar with those map files you pasted, do you know where that data is coming from? If the binary actually had sections named things like .text._ZN11DataManagerC2EPKcPc
then Bloaty should be showing them!
it seems I want something that is a combination of the section and symbol tables
Have you tried bloaty -s vm -d sections,symbols someElf.axf
? That should be a pretty nice breakdown by both section and symbol.
from bloaty.
That does look more like what I was wanting. Thanks!
from bloaty.
Related Issues (20)
- Can't read index 0 from strtab
- Add SORTBY option for vm and file size diffs
- bloaty broken on ubuntu 22.04 HOT 3
- Overflow in vm range HOT 1
- Total size in compare dont show correctly ! HOT 1
- Allow builders to prefer using system libraries
- Build broken on Arch Linux with ABSL_ASSUME errors from protobuf headers HOT 3
- Compiling under C++17 produces hundreds of warnings
- Plus sign confusing when size decreased
- zlib build failure when using bundled version HOT 1
- Size diff broken after PR #313 "Preserve Size Information During Diff"
- `couldn't find abbreviation for code` when run with `-d compileunits`
- Add support for DWARF form 30
- this tool support for windows? HOT 1
- --raw-map option missing from help string
- crash on reversed high_pc/low_pc with -d compileunits
- error building due to refinition in abseil-cpp/absl/numeric/int128.cc
- How to read the debuginfo from the Chromium output object file
- Bloaty accepts `-n 0` but not `max_rows_per_level: 0` when using `-c` option
- OSS-Fuzz issue 68551
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bloaty.