[PATCH] D74205: [WIP][llvm-dwarfdump] Add the --show-sections-sizes option

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 01:11:34 PST 2020


jhenderson added inline comments.


================
Comment at: llvm/docs/CommandGuide/llvm-dwarfdump.rst:113
 
+.. option:: --show-section-sizes
+
----------------
aprantl wrote:
> jhenderson wrote:
> > Options are documented in alphabetical order, so this should be above --statistics.
> classic dwarfdump on macOS used to have a similar functionality under the name of
> 
> ```
> --file-stats[=size]
>         Show file composition statistics for any input files. Each file's
>         contents are analyzed and broken down into byte counts for the
>         following categories: symbol table, string table, text and code,
>         DWARF debug information, STABS debug information, and other. When
>         multiple files are specified, byte count totals for each category
>         will be displayed at the end of the table.  Specify the optional
>         'size' argument to show all byte count results using unit suffixes:
>         Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte. This
>         option can be useful in tracking the size and makeup of mach-o
>         binary files, and also allows easy comparison between DWARF and
>         STABS built binaries and related object files.
> ```
> 
> that we never ported to llvm-dwarfdump. We *could* reimplement the same interface for familiarity, but I don't have a particularly strong opinion about it.
I'm neutral on whether the switch name should be changed to match, but I don't think we need to go into the granularity of the classic dwarfdump - things like symbol table, string table, text etc sizes are best retrieved from tools like llvm-readobj and llvm-size. I think we should keep this to debug section sizes (with total file size information also included for ease of comparison). The suffixes idea is not bad though - perhaps worth a future follow-up.

> Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte
Why no Exabyte? 😆 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74205/new/

https://reviews.llvm.org/D74205





More information about the llvm-commits mailing list