summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorbratell@opera.com <bratell@opera.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-22 18:49:40 +0000
committerbratell@opera.com <bratell@opera.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-22 18:49:40 +0000
commit17a6219729e23c3053dabebbb7d2d6cca43a135f (patch)
treeb87423688b071d43c90793953d6b2bac485ae1e8 /build
parent56281735c6141a07f03fff2e9be6ac0eaccdc76f (diff)
downloadchromium_src-17a6219729e23c3053dabebbb7d2d6cca43a135f.zip
chromium_src-17a6219729e23c3053dabebbb7d2d6cca43a135f.tar.gz
chromium_src-17a6219729e23c3053dabebbb7d2d6cca43a135f.tar.bz2
Graphical version of the run_binary_size_analysis tool.
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
Diffstat (limited to 'build')
-rw-r--r--build/all.gyp8
-rw-r--r--build/android/findbugs_filter/findbugs_known_bugs.txt1
-rw-r--r--build/android/pylib/symbols/elf_symbolizer.py3
-rwxr-xr-xbuild/get_landmines.py2
4 files changed, 3 insertions, 11 deletions
diff --git a/build/all.gyp b/build/all.gyp
index 202ae59..75e224d 100644
--- a/build/all.gyp
+++ b/build/all.gyp
@@ -817,14 +817,6 @@
}],
],
}, # target_name: android_builder_chromium_webrtc
- {
- # Build the java portions of the binary size analysis tool.
- 'target_name': 'binary_size_tool',
- 'type': 'none',
- 'dependencies': [
- '../tools/binary_size/binary_size.gyp:binary_size_java',
- ],
- },
], # targets
}], # OS="android"
['OS=="mac"', {
diff --git a/build/android/findbugs_filter/findbugs_known_bugs.txt b/build/android/findbugs_filter/findbugs_known_bugs.txt
index 73154e4..231f127 100644
--- a/build/android/findbugs_filter/findbugs_known_bugs.txt
+++ b/build/android/findbugs_filter/findbugs_known_bugs.txt
@@ -23,4 +23,3 @@ M V EI: org.chromium.chrome.browser.ChromeBrowserProvider$BookmarkNode.favicon()
M V EI: org.chromium.chrome.browser.ChromeBrowserProvider$BookmarkNode.thumbnail() may expose internal representation by returning ChromeBrowserProvider$BookmarkNode.mThumbnail At ChromeBrowserProvider.java
M V EI: org.chromium.content.browser.LoadUrlParams.getPostData() may expose internal representation by returning LoadUrlParams.mPostData At LoadUrlParams.java
M M LI: Incorrect lazy initialization of static field org.chromium.chrome.browser.sync.ProfileSyncService.sSyncSetupManager in org.chromium.chrome.browser.sync.ProfileSyncService.get(Context) At ProfileSyncService.java
-M B OS: org.chromium.tools.binary_size.Addr2LineWorkerPool$Addr2LineWorker$Addr2LineTask.run() may fail to close stream At Addr2LineWorkerPool.java
diff --git a/build/android/pylib/symbols/elf_symbolizer.py b/build/android/pylib/symbols/elf_symbolizer.py
index ffcd22f..90e99e5 100644
--- a/build/android/pylib/symbols/elf_symbolizer.py
+++ b/build/android/pylib/symbols/elf_symbolizer.py
@@ -286,7 +286,8 @@ class ELFSymbolizer(object):
if m:
if not m.group(1).startswith('?'):
source_path = m.group(1)
- source_line = int(m.group(2))
+ if not m.group(2).startswith('?'):
+ source_line = int(m.group(2))
else:
logging.warning('Got invalid symbol path from addr2line: %s' % line2)
diff --git a/build/get_landmines.py b/build/get_landmines.py
index a9bdfd1..daa9172 100755
--- a/build/get_landmines.py
+++ b/build/get_landmines.py
@@ -30,7 +30,7 @@ def print_landmines(target):
builder() == 'ninja'):
print 'Need to clobber winja goma due to backend cwd cache fix.'
if platform() == 'android':
- print 'Clobber: Autogen java file needs to be removed (issue 159173002)'
+ print 'Clobber: build_size.jar needs to be deleted (issue 258633003)'
if platform() == 'win' and builder() == 'ninja':
print 'Compile on cc_unittests fails due to symbols removed in r185063.'
if platform() == 'linux' and builder() == 'ninja':