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

Side by Side Diff: tools/ll_prof.py

Issue 1612403002: ll_prof: add decimal offset (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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
« 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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2012 the V8 project authors. All rights reserved. 3 # Copyright 2012 the V8 project authors. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 percent = 100.0 * count / self.self_ticks 176 percent = 100.0 * count / self.self_ticks
177 offset = lines[i][0] 177 offset = lines[i][0]
178 if percent >= 0.01: 178 if percent >= 0.01:
179 # 5 spaces for tick count 179 # 5 spaces for tick count
180 # 1 space following 180 # 1 space following
181 # 1 for '|' 181 # 1 for '|'
182 # 1 space following 182 # 1 space following
183 # 6 for the percentage number, incl. the '.' 183 # 6 for the percentage number, incl. the '.'
184 # 1 for the '%' sign 184 # 1 for the '%' sign
185 # => 15 185 # => 15
186 print "%5d | %6.2f%% %x: %s" % (count, percent, offset, lines[i][1]) 186 print "%5d | %6.2f%% %x(%d): %s" % (count, percent, offset, offset, line s[i][1])
187 else: 187 else:
188 print "%s %x: %s" % (" " * 15, offset, lines[i][1]) 188 print "%s %x(%d): %s" % (" " * 15, offset, offset, lines[i][1])
189 print 189 print
190 assert total_count == self.self_ticks, \ 190 assert total_count == self.self_ticks, \
191 "Lost ticks (%d != %d) in %s" % (total_count, self.self_ticks, self) 191 "Lost ticks (%d != %d) in %s" % (total_count, self.self_ticks, self)
192 192
193 def __str__(self): 193 def __str__(self):
194 return "%s [0x%x, 0x%x) size: %d origin: %s" % ( 194 return "%s [0x%x, 0x%x) size: %d origin: %s" % (
195 self.name, 195 self.name,
196 self.start_address, 196 self.start_address,
197 self.end_address, 197 self.end_address,
198 self.end_address - self.start_address, 198 self.end_address - self.start_address,
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 PrintTicks(optimized_ticks, ticks, "ticks in optimized code") 1060 PrintTicks(optimized_ticks, ticks, "ticks in optimized code")
1061 PrintTicks(generated_ticks, ticks, "ticks in other lazily compiled code") 1061 PrintTicks(generated_ticks, ticks, "ticks in other lazily compiled code")
1062 PrintTicks(v8_internal_ticks, ticks, "ticks in v8::internal::*") 1062 PrintTicks(v8_internal_ticks, ticks, "ticks in v8::internal::*")
1063 print "%10d total symbols" % len([c for c in code_map.AllCode()]) 1063 print "%10d total symbols" % len([c for c in code_map.AllCode()])
1064 print "%10d used symbols" % len([c for c in code_map.UsedCode()]) 1064 print "%10d used symbols" % len([c for c in code_map.UsedCode()])
1065 print "%9.2fs library processing time" % mmap_time 1065 print "%9.2fs library processing time" % mmap_time
1066 print "%9.2fs tick processing time" % sample_time 1066 print "%9.2fs tick processing time" % sample_time
1067 1067
1068 log_reader.Dispose() 1068 log_reader.Dispose()
1069 trace_reader.Dispose() 1069 trace_reader.Dispose()
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