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

Unified Diff: tools/cygprofile/patch_orderfile.py

Issue 859873002: Fix the prefix removal in patch_orderfile.py. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address pasko's comment. Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/cygprofile/patch_orderfile.py
diff --git a/tools/cygprofile/patch_orderfile.py b/tools/cygprofile/patch_orderfile.py
index 65c6d8fb177a99176313027b3c3abfdd1d783249..97ba55a4798292daf7857a86b55b855007c88df7 100755
--- a/tools/cygprofile/patch_orderfile.py
+++ b/tools/cygprofile/patch_orderfile.py
@@ -63,7 +63,7 @@ def binary_search (search_addr, start, end):
f = open (orderfile)
lines = f.readlines()
profiled_list = []
-prefixes = ['.text.', '.text.startup.', '.text.hot.', '.text.unlikely.']
+prefixes = ['.text.startup.', '.text.hot.', '.text.unlikely.', '.text.']
for line in lines:
for prefix in prefixes:
line = line.replace(prefix, '')
@@ -94,17 +94,22 @@ for line in nmlines:
sys.stderr.write ("profiled list size: " + str(len(profiled_list)) + "\n")
addresses = []
symbols_found = 0
+missing_symbols = 0
for function in profiled_list:
try:
addrs = functionAddressMap[function]
symbols_found = symbols_found + 1
except Exception:
addrs = []
- # sys.stderr.write ("WARNING: could not find symbol " + function + "\n")
+ missing_symbols += 1
+ if missing_symbols < 100:
+ sys.stderr.write ("WARNING: could not find symbol " + function + "\n")
for addr in addrs:
if not (addr in addresses):
addresses.append(addr)
sys.stderr.write ("symbols found: " + str(symbols_found) + "\n")
+if missing_symbols > 0:
+ sys.stderr.write ("WARNING: %d missing symbols." % missing_symbols)
sys.stderr.write ("number of addresses: " + str(len(addresses)) + "\n")
total_size = 0
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698