Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(445)

Side by Side Diff: tools/binary_size/libsupersize/models.py

Issue 2807343005: //tools/binary_size: Record packed .rel.dyn section size (Closed)
Patch Set: arm64 support and multiprocessing Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/binary_size/libsupersize/integration_test.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2017 The Chromium Authors. All rights reserved. 1 # Copyright 2017 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 """Classes that comprise the data model for binary size analysis. 4 """Classes that comprise the data model for binary size analysis.
5 5
6 The primary classes are Symbol, and SymbolGroup. 6 The primary classes are Symbol, and SymbolGroup.
7 7
8 Description of common properties: 8 Description of common properties:
9 * address: The start address of the symbol. 9 * address: The start address of the symbol.
10 May be 0 (e.g. for .bss or for SymbolGroups). 10 May be 0 (e.g. for .bss or for SymbolGroups).
(...skipping 13 matching lines...) Expand all
24 24
25 import collections 25 import collections
26 import copy 26 import copy
27 import os 27 import os
28 import re 28 import re
29 29
30 import match_util 30 import match_util
31 31
32 32
33 METADATA_GIT_REVISION = 'git_revision' 33 METADATA_GIT_REVISION = 'git_revision'
34 METADATA_APK_FILENAME = 'apk_file_name' # Path relative to output_directory.
34 METADATA_MAP_FILENAME = 'map_file_name' # Path relative to output_directory. 35 METADATA_MAP_FILENAME = 'map_file_name' # Path relative to output_directory.
36 METADATA_ELF_ARCHITECTURE = 'elf_arch' # "Machine" field from readelf -h
35 METADATA_ELF_FILENAME = 'elf_file_name' # Path relative to output_directory. 37 METADATA_ELF_FILENAME = 'elf_file_name' # Path relative to output_directory.
36 METADATA_ELF_MTIME = 'elf_mtime' # int timestamp in utc. 38 METADATA_ELF_MTIME = 'elf_mtime' # int timestamp in utc.
37 METADATA_ELF_BUILD_ID = 'elf_build_id' 39 METADATA_ELF_BUILD_ID = 'elf_build_id'
38 METADATA_GN_ARGS = 'gn_args' 40 METADATA_GN_ARGS = 'gn_args'
39 41
40 42
41 SECTION_TO_SECTION_NAME = { 43 SECTION_TO_SECTION_NAME = {
42 'b': '.bss', 44 'b': '.bss',
43 'd': '.data', 45 'd': '.data',
44 'r': '.rodata', 46 'r': '.rodata',
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 678
677 def _ExtractPrefixBeforeSeparator(string, separator, count=1): 679 def _ExtractPrefixBeforeSeparator(string, separator, count=1):
678 idx = -len(separator) 680 idx = -len(separator)
679 prev_idx = None 681 prev_idx = None
680 for _ in xrange(count): 682 for _ in xrange(count):
681 idx = string.find(separator, idx + len(separator)) 683 idx = string.find(separator, idx + len(separator))
682 if idx < 0: 684 if idx < 0:
683 break 685 break
684 prev_idx = idx 686 prev_idx = idx
685 return string[:prev_idx] 687 return string[:prev_idx]
OLDNEW
« no previous file with comments | « tools/binary_size/libsupersize/integration_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698