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

Side by Side Diff: tools/cygprofile/patch_orderfile.py

Issue 297063002: Fix patch_orderfile.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import commands 6 import commands
7 import os 7 import os
8 import sys 8 import sys
9 9
10 orderfile = sys.argv[1] 10 orderfile = sys.argv[1]
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 addrs = [] 100 addrs = []
101 # sys.stderr.write ("WARNING: could not find symbol " + function + "\n") 101 # sys.stderr.write ("WARNING: could not find symbol " + function + "\n")
102 for addr in addrs: 102 for addr in addrs:
103 if not (addr in addresses): 103 if not (addr in addresses):
104 addresses.append(addr) 104 addresses.append(addr)
105 sys.stderr.write ("symbols found: " + str(symbols_found) + "\n") 105 sys.stderr.write ("symbols found: " + str(symbols_found) + "\n")
106 106
107 sys.stderr.write ("number of addresses: " + str(len(addresses)) + "\n") 107 sys.stderr.write ("number of addresses: " + str(len(addresses)) + "\n")
108 total_size = 0 108 total_size = 0
109 for addr in addresses: 109 for addr in addresses:
110 # if (count % 500 == 0): 110 # if (count % 500 == 0):
pasko 2014/05/26 14:27:48 please remove this commented-out code
Philippe 2014/05/26 14:37:22 Done.
111 # print "current count: " + str(count) 111 # print "current count: " + str(count)
112 (functions, size) = binary_search (addr, 0, len(uniqueAddrs)) 112 (functions, size) = binary_search (addr, 0, len(uniqueAddrs))
113 total_size = total_size + size 113 total_size = total_size + size
114 prefixes = ['.text.', '.text.startup.', '.text.hot.', '.text.unlikely.']
114 for function in functions: 115 for function in functions:
115 print ".text." + function 116 for prefix in prefixes:
116 print "" 117 print prefix + function
118
119 # The following is needed otherwise Gold only applies a partial sort.
120 print '.text.*'
117 sys.stderr.write ("total_size: " + str(total_size) + "\n") 121 sys.stderr.write ("total_size: " + str(total_size) + "\n")
OLDNEW
« 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