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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 self.unaccounted_number_of_ticks, | 314 self.unaccounted_number_of_ticks, |
315 self.excluded_number_of_ticks)) | 315 self.excluded_number_of_ticks)) |
316 if self.total_number_of_ticks > 0: | 316 if self.total_number_of_ticks > 0: |
317 js_entries = self.js_entries.ExportValueList() | 317 js_entries = self.js_entries.ExportValueList() |
318 js_entries.extend(self.deleted_code) | 318 js_entries.extend(self.deleted_code) |
319 cpp_entries = self.cpp_entries.ExportValueList() | 319 cpp_entries = self.cpp_entries.ExportValueList() |
320 # Print the unknown ticks percentage if they are not ignored. | 320 # Print the unknown ticks percentage if they are not ignored. |
321 if not self.ignore_unknown and self.unaccounted_number_of_ticks > 0: | 321 if not self.ignore_unknown and self.unaccounted_number_of_ticks > 0: |
322 self.PrintHeader('Unknown') | 322 self.PrintHeader('Unknown') |
323 unknown_percentage = self.unaccounted_number_of_ticks * 100.0 / self.tot
al_number_of_ticks | 323 unknown_percentage = self.unaccounted_number_of_ticks * 100.0 / self.tot
al_number_of_ticks |
324 print(' %(total)5.1f%%' % { | 324 print(' %(ticks)5d %(total)5.1f%%' % { |
| 325 'ticks' : self.unaccounted_number_of_ticks, |
325 'total' : unknown_percentage, | 326 'total' : unknown_percentage, |
326 }) | 327 }) |
327 # Print the library ticks. | 328 # Print the library ticks. |
328 self.PrintHeader('Shared libraries') | 329 self.PrintHeader('Shared libraries') |
329 self.PrintEntries(cpp_entries, lambda e:e.IsSharedLibraryEntry()) | 330 self.PrintEntries(cpp_entries, lambda e:e.IsSharedLibraryEntry()) |
330 # Print the JavaScript ticks. | 331 # Print the JavaScript ticks. |
331 self.PrintHeader('JavaScript') | 332 self.PrintHeader('JavaScript') |
332 self.PrintEntries(js_entries, lambda e:not e.IsSharedLibraryEntry()) | 333 self.PrintEntries(js_entries, lambda e:not e.IsSharedLibraryEntry()) |
333 # Print the C++ ticks. | 334 # Print the C++ ticks. |
334 self.PrintHeader('C++') | 335 self.PrintHeader('C++') |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 'req_opts': self.GetRequiredArgsNames() | 444 'req_opts': self.GetRequiredArgsNames() |
444 }) | 445 }) |
445 sys.exit(2) | 446 sys.exit(2) |
446 | 447 |
447 def RunLogfileProcessing(self, tick_processor): | 448 def RunLogfileProcessing(self, tick_processor): |
448 tick_processor.ProcessLogfile(self.log_file, self.state, self.ignore_unknown
, self.separate_ic) | 449 tick_processor.ProcessLogfile(self.log_file, self.state, self.ignore_unknown
, self.separate_ic) |
449 | 450 |
450 | 451 |
451 if __name__ == '__main__': | 452 if __name__ == '__main__': |
452 sys.exit('You probably want to run windows-tick-processor.py or linux-tick-pro
cessor.py.') | 453 sys.exit('You probably want to run windows-tick-processor.py or linux-tick-pro
cessor.py.') |
OLD | NEW |