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

Side by Side Diff: tools/tickprocessor.py

Issue 7075: Improve profiler output to make it easier to see the (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 59
60 class JSCodeEntry(CodeEntry): 60 class JSCodeEntry(CodeEntry):
61 61
62 def __init__(self, start_addr, name, type, size): 62 def __init__(self, start_addr, name, type, size):
63 CodeEntry.__init__(self, start_addr, name) 63 CodeEntry.__init__(self, start_addr, name)
64 self.type = type 64 self.type = type
65 self.size = size 65 self.size = size
66 66
67 def ToString(self): 67 def ToString(self):
68 return self.name + ' ' + self.type 68 name = self.name
69 if name == '': name = '<anonymous>'
70 return self.type + ': ' + name
69 71
70 72
71 class TickProcessor(object): 73 class TickProcessor(object):
72 74
73 def __init__(self): 75 def __init__(self):
74 self.log_file = '' 76 self.log_file = ''
75 self.deleted_code = [] 77 self.deleted_code = []
76 self.vm_extent = {} 78 self.vm_extent = {}
77 self.js_entries = splaytree.SplayTree() 79 self.js_entries = splaytree.SplayTree()
78 self.cpp_entries = splaytree.SplayTree() 80 self.cpp_entries = splaytree.SplayTree()
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 else: 197 else:
196 non_library_percentage = entry.tick_count * 100.0 / number_of_non_libr ary_ticks 198 non_library_percentage = entry.tick_count * 100.0 / number_of_non_libr ary_ticks
197 print(' %(total)5.1f%% %(nonlib)6.1f%% %(name)s' % { 199 print(' %(total)5.1f%% %(nonlib)6.1f%% %(name)s' % {
198 'total' : total_percentage, 200 'total' : total_percentage,
199 'nonlib' : non_library_percentage, 201 'nonlib' : non_library_percentage,
200 'name' : entry.ToString() 202 'name' : entry.ToString()
201 }) 203 })
202 204
203 if __name__ == '__main__': 205 if __name__ == '__main__':
204 sys.exit('You probably want to run windows-tick-processor.py or linux-tick-pro cessor.py.') 206 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