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

Side by Side Diff: tools/objdump-v8

Issue 2757263002: [disasm] Make jump target printing perf friendly (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « src/disassembler.cc ('k') | 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/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2016 the V8 project authors. All rights reserved. 3 # Copyright 2016 the V8 project authors. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 with codefile: 66 with codefile:
67 printing = False 67 printing = False
68 for line in codefile: 68 for line in codefile:
69 if line.startswith("0x"): 69 if line.startswith("0x"):
70 addr = int(line.split()[0], 0) 70 addr = int(line.split()[0], 0)
71 if start <= addr <= end: 71 if start <= addr <= end:
72 printing = True 72 printing = True
73 sys.stdout.write(format_line(line)) 73 sys.stdout.write(format_line(line))
74 elif printing: 74 elif printing:
75 break 75 break
76 elif printing and not is_comment(line): 76 elif printing:
77 break 77 if not is_comment(line):
78 break
79 else:
80 sys.stdout.write(line)
78 else: 81 else:
79 sys.argv[0] = "objdump" 82 sys.argv[0] = "objdump"
80 sys.exit(subprocess.call(sys.argv)) 83 sys.exit(subprocess.call(sys.argv))
81 84
82 if __name__ == "__main__": 85 if __name__ == "__main__":
83 main() 86 main()
OLDNEW
« no previous file with comments | « src/disassembler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698