OLD | NEW |
1 # Copyright 2008 the V8 project authors. All rights reserved. | 1 # Copyright 2008 the V8 project authors. All rights reserved. |
2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
4 # met: | 4 # met: |
5 # | 5 # |
6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 assembler = self.assemblers.pop(addr) | 228 assembler = self.assemblers.pop(addr) |
229 else: | 229 else: |
230 assembler = None | 230 assembler = None |
231 self.js_entries.Insert(addr, JSCodeEntry(addr, name, type, size, assembler)) | 231 self.js_entries.Insert(addr, JSCodeEntry(addr, name, type, size, assembler)) |
232 | 232 |
233 def ProcessCodeMove(self, from_addr, to_addr): | 233 def ProcessCodeMove(self, from_addr, to_addr): |
234 try: | 234 try: |
235 removed_node = self.js_entries.Remove(from_addr) | 235 removed_node = self.js_entries.Remove(from_addr) |
236 removed_node.value.SetStartAddress(to_addr); | 236 removed_node.value.SetStartAddress(to_addr); |
237 self.js_entries.Insert(to_addr, removed_node.value) | 237 self.js_entries.Insert(to_addr, removed_node.value) |
238 except 'KeyNotFound': | 238 except splaytree.KeyNotFoundError: |
239 print('Code move event for unknown code: 0x%x' % from_addr) | 239 print('Code move event for unknown code: 0x%x' % from_addr) |
240 | 240 |
241 def ProcessCodeDelete(self, from_addr): | 241 def ProcessCodeDelete(self, from_addr): |
242 try: | 242 try: |
243 removed_node = self.js_entries.Remove(from_addr) | 243 removed_node = self.js_entries.Remove(from_addr) |
244 self.deleted_code.append(removed_node.value) | 244 self.deleted_code.append(removed_node.value) |
245 except 'KeyNotFound': | 245 except splaytree.KeyNotFoundError: |
246 print('Code delete event for unknown code: 0x%x' % from_addr) | 246 print('Code delete event for unknown code: 0x%x' % from_addr) |
247 | 247 |
248 def ProcessBeginCodeRegion(self, id, assm, start, name): | 248 def ProcessBeginCodeRegion(self, id, assm, start, name): |
249 if not assm in self.pending_assemblers: | 249 if not assm in self.pending_assemblers: |
250 self.pending_assemblers[assm] = Assembler() | 250 self.pending_assemblers[assm] = Assembler() |
251 assembler = self.pending_assemblers[assm] | 251 assembler = self.pending_assemblers[assm] |
252 assembler.pending_regions[id] = CodeRegion(start, name) | 252 assembler.pending_regions[id] = CodeRegion(start, name) |
253 | 253 |
254 def ProcessEndCodeRegion(self, id, assm, end): | 254 def ProcessEndCodeRegion(self, id, assm, end): |
255 assm = self.pending_assemblers[assm] | 255 assm = self.pending_assemblers[assm] |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 'req_opts': self.GetRequiredArgsNames() | 456 'req_opts': self.GetRequiredArgsNames() |
457 }) | 457 }) |
458 sys.exit(2) | 458 sys.exit(2) |
459 | 459 |
460 def RunLogfileProcessing(self, tick_processor): | 460 def RunLogfileProcessing(self, tick_processor): |
461 tick_processor.ProcessLogfile(self.log_file, self.state, self.ignore_unknown
, self.separate_ic) | 461 tick_processor.ProcessLogfile(self.log_file, self.state, self.ignore_unknown
, self.separate_ic) |
462 | 462 |
463 | 463 |
464 if __name__ == '__main__': | 464 if __name__ == '__main__': |
465 sys.exit('You probably want to run windows-tick-processor.py or linux-tick-pro
cessor.py.') | 465 sys.exit('You probably want to run windows-tick-processor.py or linux-tick-pro
cessor.py.') |
OLD | NEW |