Author: [email protected]
Date: Mon Feb 23 04:18:46 2009
New Revision: 1338

Modified:
    branches/bleeding_edge/tools/tickprocessor.py

Log:
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

Modified: branches/bleeding_edge/tools/tickprocessor.py
==============================================================================
--- branches/bleeding_edge/tools/tickprocessor.py       (original)
+++ branches/bleeding_edge/tools/tickprocessor.py       Mon Feb 23 04:18:46 2009
@@ -386,9 +386,15 @@
          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]
        })

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to