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

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: Remove global _OBJDUMP_BINARY 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
« no previous file with comments | « tools/cygprofile/cygprofile_unittest.cc ('k') | tools/cygprofile/symbol_extractor.py » ('j') | 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 f4b590f49c799a46ff467a82fdb2144ff3f7177e..88abc62c889c79ab7f0558de03b2779e0ab02604 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,19 @@ def _PrintSymbolsWithPrefixes(symbol_names, output_file):
def main(argv):
+ parser = optparse.OptionParser(usage=
+ 'usage: %prog [options] <unpatched_orderfile> <library>')
+ parser.add_option('--target-arch', action='store', dest='arch',
+ default='arm',
+ choices=['arm', 'arm64', 'x86', 'x86_64', 'x64', 'mips'],
+ help='The target architecture for the library.')
+ options, argv = parser.parse_args(argv)
if len(argv) != 3:
- print 'Usage: %s <unpatched_orderfile> <libchrome.so>' % argv[0]
+ parser.print_help()
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)
« no previous file with comments | « tools/cygprofile/cygprofile_unittest.cc ('k') | tools/cygprofile/symbol_extractor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698