Skip to content

Measures the binary bloat caused by each line in a C/C++ program

License

Notifications You must be signed in to change notification settings

wmanley/bloat-blame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

SYNOPSIS

bloat-blame [options] binary

DESCRIPTION

bloat-blame is a tool for working out how many bytes each line of source code takes up in a C++ program. It uses addr2line and readelf to parse debug info.

OPTIONS

  • --extent [all|.text]: Specifies which bytes within the binary should be analysed

DEPENDENCIES

bloat-blame depends on:

HOWTO

  1. Build your program/library with debug info turned on:

     $ CFLAGS='-g' make
    
  2. Run bloat-blame on the resulting binary:

     $ bloat-blame ./myprog
    

bloat-blame will output something like:

22     src/main.c:22
213    src/main.c:23
7653   src/bloat.c:324

This is a list in ascending order of size. The first column is the number of bytes apportioned to the file/line in the second column.

LICENSE

bloat-blame is Copyright (C) 2012 YouView TV Ltd. and is distributed under the GNU General Public License version 2 or at your option any later version. See the COPYING file for more information. This licence was chosen to be consistent with GNU binutils.

About

Measures the binary bloat caused by each line in a C/C++ program

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages