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

Side by Side Diff: tools/tickprocessor.py

Issue 27050: Added ticks to the display of unknown time in the profile. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 unified diff | Download patch | Annotate | Revision Log
« 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 # 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
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
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.')
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