Commit f85b5261 authored by sgjesse@chromium.org's avatar sgjesse@chromium.org

Only account for actual time spend in call path calculation.

The call path section of the profile now starts with information on the percentage of the ticks which does not contain call path information.

Added tick count to the call path part as well.
Review URL: http://codereview.chromium.org/28022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 0c1c8d18
......@@ -386,9 +386,15 @@ class TickProcessor(object):
total_stacks += count
all_stacks_items = all_stacks.items();
all_stacks_items.sort(key = itemgetter(1), reverse=True)
missing_percentage = (self.total_number_of_ticks - total_stacks) * 100.0 / self.total_number_of_ticks
print(' %(ticks)5d %(total)5.1f%% <no call path information>' % {
'ticks' : self.total_number_of_ticks - total_stacks,
'total' : missing_percentage
})
for stack, count in all_stacks_items:
total_percentage = count * 100.0 / total_stacks
print(' %(total)5.1f%% %(call_path)s' % {
total_percentage = count * 100.0 / self.total_number_of_ticks
print(' %(ticks)5d %(total)5.1f%% %(call_path)s' % {
'ticks' : count,
'total' : total_percentage,
'call_path' : stack[0] + ' <- ' + stack[1]
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment