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

Unified Diff: tools/cygprofile/patch_orderfile.py

Issue 902633002: Fix a bunch of issues blocking 64-bit orderfile generation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
Index: tools/cygprofile/patch_orderfile.py
diff --git a/tools/cygprofile/patch_orderfile.py b/tools/cygprofile/patch_orderfile.py
index f4b590f49c799a46ff467a82fdb2144ff3f7177e..799bb2fc3be391f4740b92051f8744a713695a44 100755
--- a/tools/cygprofile/patch_orderfile.py
+++ b/tools/cygprofile/patch_orderfile.py
@@ -26,6 +26,7 @@ The general pipeline is:
import collections
import logging
+import optparse
import sys
import symbol_extractor
@@ -204,11 +205,17 @@ def _PrintSymbolsWithPrefixes(symbol_names, output_file):
def main(argv):
+ parser = optparse.OptionParser()
+ parser.add_option('--target_arch', action='store', type='string',
+ dest='arch', default='arm',
+ help='The target architecture for libchrome.so')
+ options, argv = parser.parse_args(argv)
if len(argv) != 3:
print 'Usage: %s <unpatched_orderfile> <libchrome.so>' % argv[0]
return 1
orderfile_filename = argv[1]
binary_filename = argv[2]
+ symbol_extractor.SetArchitecture(options.arch)
(offset_to_symbol_infos, name_to_symbol_infos) = _GroupSymbolInfosFromBinary(
binary_filename)
profiled_symbols = GetSymbolsFromOrderfile(orderfile_filename)

Powered by Google App Engine
This is Rietveld 408576698