summaryrefslogtreecommitdiffstats
path: root/tools/cygprofile
diff options
context:
space:
mode:
authorazarchs <azarchs@chromium.org>2015-06-01 08:46:55 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-01 15:48:35 +0000
commitd5baf2e2a3fff29fa9dd7110932825fcb45e5e08 (patch)
treef8256a21e80dcc741191fab379bbcce0488be23e /tools/cygprofile
parent172a2a72bff187c2cd9d832d6e5d48168831a8da (diff)
downloadchromium_src-d5baf2e2a3fff29fa9dd7110932825fcb45e5e08.zip
chromium_src-d5baf2e2a3fff29fa9dd7110932825fcb45e5e08.tar.gz
chromium_src-d5baf2e2a3fff29fa9dd7110932825fcb45e5e08.tar.bz2
Fix breakages in https://codereview.chromium.org/1155713003/
Review URL: https://codereview.chromium.org/1161313002 Cr-Commit-Position: refs/heads/master@{#332195}
Diffstat (limited to 'tools/cygprofile')
-rwxr-xr-xtools/cygprofile/cyglog_to_orderfile.py4
-rwxr-xr-xtools/cygprofile/patch_orderfile.py6
2 files changed, 7 insertions, 3 deletions
diff --git a/tools/cygprofile/cyglog_to_orderfile.py b/tools/cygprofile/cyglog_to_orderfile.py
index 6dd64ed..c3b1bec 100755
--- a/tools/cygprofile/cyglog_to_orderfile.py
+++ b/tools/cygprofile/cyglog_to_orderfile.py
@@ -147,8 +147,8 @@ def GetSymbolToSectionsMapFromObjectFiles(obj_dir):
# complete, base, and allocating. If they're all the same they'll
# get folded together.
if not (re.match('[CD][123]E', symbol) and
- (symbol_extractor.Demangle(symbol) ==
- symbol_extractor.Demangle(symbol_to_sections_map[symbol][0]
+ (symbol_extractor.DemangleSymbol(symbol) ==
+ symbol_extractor.DemangleSymbol(symbol_to_sections_map[symbol][0]
.lstrip('.text.')))):
symbol_warnings.Write('Symbol ' + symbol +
' in conflicting sections ' +
diff --git a/tools/cygprofile/patch_orderfile.py b/tools/cygprofile/patch_orderfile.py
index 8e8ce58..a38343a 100755
--- a/tools/cygprofile/patch_orderfile.py
+++ b/tools/cygprofile/patch_orderfile.py
@@ -102,6 +102,10 @@ def _StripPrefix(line):
def _SectionNameToSymbols(section_name, section_to_symbols_map):
"""Returns all symbols which could be referred to by section_name."""
+ if (section_name == '' or
+ section_name == '.text.*' or
+ section_name == '.text'):
+ return # Don't return anything for catch-all sections
if section_name in section_to_symbols_map:
for symbol in section_to_symbols_map[section_name]:
yield symbol
@@ -217,7 +221,7 @@ def _PrintSymbolsAsSections(symbol_names, symbol_to_sections_map, output_file):
for name in symbol_names:
if name in symbol_to_sections_map:
for linker_section in symbol_to_sections_map[name]:
- if not linker_section in unique_outputs:
+ if linker_section != '.text' and not linker_section in unique_outputs:
output_file.write(linker_section + '\n')
unique_outputs.add(linker_section)
else: