Title: [195409] trunk/Tools
Revision
195409
Author
[email protected]
Date
2016-01-21 07:47:31 -0800 (Thu, 21 Jan 2016)

Log Message

display-profiler-output should be able to display code blocks sorted by machine counts
https://bugs.webkit.org/show_bug.cgi?id=153298

Reviewed by Oliver Hunt.

* Scripts/display-profiler-output:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (195408 => 195409)


--- trunk/Tools/ChangeLog	2016-01-21 15:27:39 UTC (rev 195408)
+++ trunk/Tools/ChangeLog	2016-01-21 15:47:31 UTC (rev 195409)
@@ -1,3 +1,12 @@
+2016-01-21  Filip Pizlo  <[email protected]>
+
+        display-profiler-output should be able to display code blocks sorted by machine counts
+        https://bugs.webkit.org/show_bug.cgi?id=153298
+
+        Reviewed by Oliver Hunt.
+
+        * Scripts/display-profiler-output:
+
 2016-01-21  Julien Isorce  <[email protected]>
 
         Ensure to use compatible liborc version with wanted gstreamer version

Modified: trunk/Tools/Scripts/display-profiler-output (195408 => 195409)


--- trunk/Tools/Scripts/display-profiler-output	2016-01-21 15:27:39 UTC (rev 195408)
+++ trunk/Tools/Scripts/display-profiler-output	2016-01-21 15:47:31 UTC (rev 195409)
@@ -535,7 +535,7 @@
     end
 end
 
-def summary(mode)
+def summary(mode, order)
     remaining = screenWidth
     
     # Figure out how many columns we need for the code block names, and for counts
@@ -618,7 +618,14 @@
     puts
     $bytecodes.sort {
         | a, b |
-        b.totalMaxTopExecutionCount <=> a.totalMaxTopExecutionCount
+        case order
+        when :bytecode
+            b.totalMaxTopExecutionCount <=> a.totalMaxTopExecutionCount
+        when :machine
+            b.totalMaxBottomExecutionCount <=> a.totalMaxBottomExecutionCount
+        else
+            raise
+        end
     }.each {
         | bytecode |
         print(center(bytecode.name(hashCols), hashCols))
@@ -738,9 +745,13 @@
     when "quit", "q", "exit"
         exit 0
     when "summary", "s"
-        summary(:summary)
+        summary(:summary, :bytecode)
     when "full", "f"
-        summary(:full)
+        if args[0] and (args[0] == "m" or args[0] == "machine")
+            summary(:full, :machine)
+        else
+            summary(:full, :bytecode)
+        end
     when "source"
         if args.length != 1
             puts "Usage: source <code block hash>"
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to