summaryrefslogtreecommitdiffstats
path: root/tools/binary_size
Commit message (Collapse)AuthorAgeFilesLines
* Freshen Binary Size Tool documentation.andrewhayden2015-03-123-71/+77
| | | | | | | | | BUG= NOTRY=true Review URL: https://codereview.chromium.org/952943002 Cr-Commit-Position: refs/heads/master@{#320269}
* Handle shared memory symbols better in the binarysize tool.bratell2015-02-184-137/+526
| | | | | | | | | | | | | | | | The linker can let two symbols share the same memory space and then it is wrong to count that memory space twice. Better to let each symbol contribute with a proportional part of that symbol. This only affects the explain_binary_size_delta program. The graphical treeview will still use the full symbol size since it's valuable information in that context. BUG= Review URL: https://codereview.chromium.org/397593007 Cr-Commit-Position: refs/heads/master@{#316844}
* Cleanup: Presubmit API is built into depot_tools.tfarina2015-01-311-1/+1
| | | | | | | | | | | | | Not in gcl, which probably these days nobody working on Chromium uses. BUG=None R=maruel@chromium.org TBR=maruel@chromium.org NOPRESUBMIT=true Review URL: https://codereview.chromium.org/887033002 Cr-Commit-Position: refs/heads/master@{#314039}
* binary_size: Remove legacy path, keep / as / for unittests on windowsscottmg2014-12-154-452/+23
| | | | | | | | | | | | Starting on a port to Windows. As the non-legacy path was added 8 months ago, is it ok to remove the legacy one now? R=bratell@opera.com, andrewhayden@chromium.org BUG=441867 Review URL: https://codereview.chromium.org/797363002 Cr-Commit-Position: refs/heads/master@{#308395}
* Binary Size tool: Check DWARF format only when possible.bratell2014-09-181-1/+2
| | | | | | | | | | | | The tool can be run with a preprocessed nm file as input and trying to run a DWARF version check in that case won't work. BUG=415084 R=andrewhayden@chromium.org Review URL: https://codereview.chromium.org/573273002 Cr-Commit-Position: refs/heads/master@{#295443}
* Binary size tool, handle symbols with no path better.bratell2014-09-162-15/+175
| | | | | | | | | | | | | | | | | | | | If symbols with the same name appeared in the same "file" (as in 'unknown file') then they collided and only the last such symbol was remembered. This happened for me with string symbols where all .L.str21 were in the ?? file. Store a list of symbol sizes per symbol and file. If there are more than one symbol size per symbol and file, compare them differently to see what might have happened. A bit hard to read code. I hope it won't have to be changed. BUG=412335 R=andrewhayden@chromium.org Review URL: https://codereview.chromium.org/551203004 Cr-Commit-Position: refs/heads/master@{#295033}
* Binary size tool: Don't escape text that won't be parsed.bratell2014-09-101-5/+5
| | | | | | | | | | | | | | Only text that will be sent through an HTML parser needs to be parsed. Escaping more than that results in & and < and similar in the output. R=andrewhayden@chromium.org BUG=412708 Review URL: https://codereview.chromium.org/562623002 Cr-Commit-Position: refs/heads/master@{#294176}
* binarysize tool: Cleaning up some progress output.bratell2014-09-021-3/+1
| | | | | | | | | | R=primiano BUG= Review URL: https://codereview.chromium.org/399683004 Cr-Commit-Position: refs/heads/master@{#292999}
* Include a pak file in the binary_size output if requested.bratell@opera.com2014-07-211-0/+77
| | | | | | | | | | | By adding --pak out/Release/content_shell.pak at the command line the contents of it will be added to the visual output. BUG=370383 Review URL: https://codereview.chromium.org/380693002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284440 0039d316-1c4b-4281-b951-d872f2087c98
* Polishing binary_size tool output.bratell@opera.com2014-07-162-148/+210
| | | | | | | | | | | Doing some sorting and splitting of data to make large amounts of changes easier to study. BUG= Review URL: https://codereview.chromium.org/375063002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283540 0039d316-1c4b-4281-b951-d872f2087c98
* binary_size_tool: fix for ambiguous addr2line outputsebastianl@opera.com2014-06-271-8/+43
| | | | | | | | | | | | | Sometimes the output of addr2line is ambiguous, example: unicode.cc:0 and does not include the absolute path of the source file. This fix is mostly a port of andrewhaydens solution to disambiguate the path. BUG= Review URL: https://codereview.chromium.org/339853004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280303 0039d316-1c4b-4281-b951-d872f2087c98
* binary_size: Easier-to-read outputbratell@opera.com2014-06-241-11/+31
| | | | | | | | | | | It's easy to have to have to click a few levels down (in my case down into / -> home -> bratell -> src -> chromium -> src). Remove the part that seems to be an unnecessary prefix by assuming that everything above cwd is not interesting. Review URL: https://codereview.chromium.org/303453003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279448 0039d316-1c4b-4281-b951-d872f2087c98
* binary_size: Avoid creating nodes with many thousand children.bratell@opera.com2014-06-121-34/+99
| | | | | | | | | | | | If a bucket has too many thousand children the webapp (graph lib?) hangs. Protect against the most common case by splitting up the (No Path) section in chunks of 3000 symbols. BUG=370377 Review URL: https://codereview.chromium.org/302443006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276650 0039d316-1c4b-4281-b951-d872f2087c98
* binary_size: Fix jobs number parsingemoller@opera.com2014-06-101-1/+1
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/321163003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276164 0039d316-1c4b-4281-b951-d872f2087c98
* binary_size: Check debug data format before starting.bratell@opera.com2014-06-091-1/+32
| | | | | | | | | | | | | If the debug data format is DWARF4 and binutils is not new enough the output will be more or less useless (no files will be detected). Detect that case early instead of having the user wait for many hours for something that can't be used. BUG=370378 Review URL: https://codereview.chromium.org/302633003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275866 0039d316-1c4b-4281-b951-d872f2087c98
* Emit partial results if binary_size is interrupted.bratell@opera.com2014-06-051-31/+46
| | | | | | | | | | | | | Instead of just throwing away everything if the user presses Ctrl-c, write down whatever data we have to the disk. By asking for the largest symbols first, it's sometimes possible to get a quite good picture after only 10-15% of the total runtime. BUG=377466 Review URL: https://codereview.chromium.org/305503002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275053 0039d316-1c4b-4281-b951-d872f2087c98
* Added PRESUBMIT.py for binary_size tools.bratell@opera.com2014-05-234-119/+238
| | | | | | | | | | | Make the tests run for every commit to make sure tests and code stay in sync and are both working. BUG= Review URL: https://codereview.chromium.org/296003007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272496 0039d316-1c4b-4281-b951-d872f2087c98
* Graphical version of the run_binary_size_analysis tool.bratell@opera.com2014-05-228-1389/+749
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The binary_size tool suit includes tools that are useful when trying to reduce binary size of a program, and chromium related programs in particular. This commit (mostly written by andrewhayden@chromium.org for Android but ported to generic Linux by bratell@opera.com) adds a graphical HTML based output for run_binary_size_analysis.py. In the generated web page it is possible to dynamically and graphically browse the binary and each part of the source tree is given a size that reflects its contribution to the binary size. The run_binary_size_analysis tool is run on compiled binaries with symbols and uses nm and addr2line to map parts of the binary to source code. Since addr2line is slow the operation to map binary symbols to source files takes a while but the output is well worth it when shrinking programs. See its usage information for details about how to run it. This commit also includes the tool explain_binary_size_delta.py (textual output) which can be used to understand why a binary changed size and in what way. See its usage information for details about how to run it. There are many further improvements possible to to do on these tools. Search the bug database for Label:Tools-BinarySize for suggestions. BUG=339059 R=primiano@chromium.org,andrewhayden@chromium.org Review URL: https://codereview.chromium.org/258633003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272255 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a findbugs warning - check file.mkdirs return value.vandebo@chromium.org2014-05-031-3/+6
| | | | | | | | BUG=NONE Review URL: https://codereview.chromium.org/262743003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268018 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a findbugs error in Addr2LineWorkerPool.java.thestig@chromium.org2014-05-011-1/+3
| | | | | | Review URL: https://codereview.chromium.org/268533002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267664 0039d316-1c4b-4281-b951-d872f2087c98
* Fix findbugs warning - narrow synchronization scope in NmDumper.tommycli@chromium.org2014-05-011-7/+9
| | | | | | | | BUG=NONE Review URL: https://codereview.chromium.org/266633003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267601 0039d316-1c4b-4281-b951-d872f2087c98
* New binary size tool visualization options.andrewhayden@chromium.org2014-04-167-203/+1911
| | | | | | | | | BUG= NOTRY=true Review URL: https://codereview.chromium.org/231803002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264270 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bug in binary_size script and cosmetic updatesandrewhayden@chromium.org2014-01-173-10/+15
| | | | | | | | | BUG= NOTRY=true Review URL: https://codereview.chromium.org/132233017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245505 0039d316-1c4b-4281-b951-d872f2087c98
* Add tool to help analyze binary sizeandrewhayden@chromium.org2014-01-179-0/+2014
BUG= Review URL: https://codereview.chromium.org/119083006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245405 0039d316-1c4b-4281-b951-d872f2087c98