Title: [136602] trunk/Tools
- Revision
- 136602
- Author
- [email protected]
- Date
- 2012-12-04 17:32:32 -0800 (Tue, 04 Dec 2012)
Log Message
display-profiler-output should not use reflective infocation to resolve command names
Rubber stamped by Mark Hahnenberg.
Reflection is amazing, but here it was just kind of a bit much.
* Scripts/display-profiler-output:
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (136601 => 136602)
--- trunk/Tools/ChangeLog 2012-12-05 01:26:13 UTC (rev 136601)
+++ trunk/Tools/ChangeLog 2012-12-05 01:32:32 UTC (rev 136602)
@@ -1,3 +1,13 @@
+2012-12-04 Filip Pizlo <[email protected]>
+
+ display-profiler-output should not use reflective infocation to resolve command names
+
+ Rubber stamped by Mark Hahnenberg.
+
+ Reflection is amazing, but here it was just kind of a bit much.
+
+ * Scripts/display-profiler-output:
+
2012-12-02 Filip Pizlo <[email protected]>
JSC should be able to report profiling data associated with the IR dumps and disassembly
Modified: trunk/Tools/Scripts/display-profiler-output (136601 => 136602)
--- trunk/Tools/Scripts/display-profiler-output 2012-12-05 01:26:13 UTC (rev 136601)
+++ trunk/Tools/Scripts/display-profiler-output 2012-12-05 01:32:32 UTC (rev 136602)
@@ -201,19 +201,18 @@
end
end
-module Commands
- def self.CMD_help
- puts "summary Print a summary of code block execution rates."
- puts "display Display details for a code block."
- puts "help Print this message."
- puts "quit Quit."
- end
-
- def self.CMD_quit
+def executeCommand(*commandArray)
+ command = commandArray[0]
+ args = commandArray[1..-1]
+ case command
+ when "help", "h", "?"
+ puts "summary (s) Print a summary of code block execution rates."
+ puts "display (d) Display details for a code block."
+ puts "help (h) Print this message."
+ puts "quit (q) Quit."
+ when "quit", "q", "exit"
exit 0
- end
-
- def self.CMD_summary
+ when "summary", "s"
hashCols = 14
countCols = 10 * $engines.size
@@ -229,9 +228,7 @@
bytecode.maxExecutionCount(engine).to_s
}.join("/"), countCols))
}
- end
-
- def self.CMD_display(*args)
+ when "display", "d"
case args.length
when 1
hash = args[0]
@@ -282,21 +279,14 @@
}
}
}
- end
-end
-
-def executeCommand(command, args)
- if Commands.methods.find_index("CMD_#{command}")
- Commands.send("CMD_#{command}", *args)
else
puts "Invalid command: #{command}"
end
end
-executeCommand("summary", [])
+executeCommand("summary")
while commandLine = Readline.readline("> ", true)
- commandArray = commandLine.split
- executeCommand(commandArray[0], commandArray[1..-1])
+ executeCommand(*commandLine.split)
end
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes