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

Side by Side Diff: tools/tickprocessor.py

Issue 19537: Adding src_file_name:line_number into perf log entries for compiled JS functi... (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 | « src/objects-inl.h ('k') | 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 return self.region_ticks 97 return self.region_ticks
98 98
99 def Regions(self): 99 def Regions(self):
100 if self.assembler: 100 if self.assembler:
101 return self.assembler.regions 101 return self.assembler.regions
102 else: 102 else:
103 return [] 103 return []
104 104
105 def ToString(self): 105 def ToString(self):
106 name = self.name 106 name = self.name
107 if name == '': name = '<anonymous>' 107 if name == '':
108 name = '<anonymous>'
109 elif name.startswith(' '):
110 name = '<anonymous>' + name
108 return self.type + ': ' + name 111 return self.type + ': ' + name
109 112
110 113
111 class CodeRegion(object): 114 class CodeRegion(object):
112 115
113 def __init__(self, start_offset, name): 116 def __init__(self, start_offset, name):
114 self.start_offset = start_offset 117 self.start_offset = start_offset
115 self.name = name 118 self.name = name
116 self.end_offset = None 119 self.end_offset = None
117 120
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 for (name, ticks) in items: 304 for (name, ticks) in items:
302 print(' flat cum') 305 print(' flat cum')
303 print(' %(flat)5.1f%% %(accum)5.1f%% %(name)s' % { 306 print(' %(flat)5.1f%% %(accum)5.1f%% %(name)s' % {
304 'flat' : ticks[1] * 100.0 / entry.tick_count, 307 'flat' : ticks[1] * 100.0 / entry.tick_count,
305 'accum' : ticks[0] * 100.0 / entry.tick_count, 308 'accum' : ticks[0] * 100.0 / entry.tick_count,
306 'name': name 309 'name': name
307 }) 310 })
308 311
309 if __name__ == '__main__': 312 if __name__ == '__main__':
310 sys.exit('You probably want to run windows-tick-processor.py or linux-tick-pro cessor.py.') 313 sys.exit('You probably want to run windows-tick-processor.py or linux-tick-pro cessor.py.')
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698