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

Side by Side Diff: tools/ll_prof.py

Issue 1861323002: Fix annotated disassembly in ll_prof.py (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | « 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/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2012 the V8 project authors. All rights reserved. 3 # Copyright 2012 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 def __str__(self): 193 def __str__(self):
194 return "%s [0x%x, 0x%x) size: %d origin: %s" % ( 194 return "%s [0x%x, 0x%x) size: %d origin: %s" % (
195 self.name, 195 self.name,
196 self.start_address, 196 self.start_address,
197 self.end_address, 197 self.end_address,
198 self.end_address - self.start_address, 198 self.end_address - self.start_address,
199 self.origin) 199 self.origin)
200 200
201 def _GetDisasmLines(self, arch, options): 201 def _GetDisasmLines(self, arch, options):
202 inplace = True 202 if self.origin == JS_ORIGIN:
203 filename = self.origin 203 inplace = False
204 filename = options.log + ".ll"
205 else:
206 inplace = True
207 filename = self.origin
204 return disasm.GetDisasmLines(filename, 208 return disasm.GetDisasmLines(filename,
205 self.origin_offset, 209 self.origin_offset,
206 self.end_address - self.start_address, 210 self.end_address - self.start_address,
207 arch, 211 arch,
208 inplace) 212 inplace)
209 213
210 214
211 class CodePage(object): 215 class CodePage(object):
212 """Group of adjacent code objects.""" 216 """Group of adjacent code objects."""
213 217
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 PrintTicks(optimized_ticks, ticks, "ticks in optimized code") 980 PrintTicks(optimized_ticks, ticks, "ticks in optimized code")
977 PrintTicks(generated_ticks, ticks, "ticks in other lazily compiled code") 981 PrintTicks(generated_ticks, ticks, "ticks in other lazily compiled code")
978 PrintTicks(v8_internal_ticks, ticks, "ticks in v8::internal::*") 982 PrintTicks(v8_internal_ticks, ticks, "ticks in v8::internal::*")
979 print "%10d total symbols" % len([c for c in code_map.AllCode()]) 983 print "%10d total symbols" % len([c for c in code_map.AllCode()])
980 print "%10d used symbols" % len([c for c in code_map.UsedCode()]) 984 print "%10d used symbols" % len([c for c in code_map.UsedCode()])
981 print "%9.2fs library processing time" % mmap_time 985 print "%9.2fs library processing time" % mmap_time
982 print "%9.2fs tick processing time" % sample_time 986 print "%9.2fs tick processing time" % sample_time
983 987
984 log_reader.Dispose() 988 log_reader.Dispose()
985 trace_reader.Dispose() 989 trace_reader.Dispose()
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