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

Unified Diff: runtime/vm/code_generator_ia32.cc

Issue 9007027: Add (debug) printing when IC is used in optimized code (must eliminate it). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/compiler.cc » ('j') | runtime/vm/opt_code_generator_ia32.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator_ia32.cc
===================================================================
--- runtime/vm/code_generator_ia32.cc (revision 2670)
+++ runtime/vm/code_generator_ia32.cc (working copy)
@@ -25,6 +25,8 @@
DEFINE_FLAG(bool, print_ast, false, "Print abstract syntax tree.");
DEFINE_FLAG(bool, print_scopes, false, "Print scopes of local variables.");
DEFINE_FLAG(bool, trace_functions, false, "Trace entry of each function.");
+DEFINE_FLAG(bool, print_ic_in_optimized, false,
+ "Debugging helper to identify potential performance pitfalls.");
DEFINE_FLAG(int, optimization_invocation_threshold, 1000,
"number of invocations before a function is optimized, -1 means never.");
DECLARE_FLAG(bool, enable_type_checks);
@@ -428,6 +430,10 @@
int num_arguments,
const Array& optional_arguments_names,
intptr_t num_args_checked) {
+ if (FLAG_print_ic_in_optimized && IsOptimizing()) {
+ OS::Print("Generate IC in optimized code: id %d name: '%s'\n",
+ node_id, function_name.ToCString());
+ }
ASSERT(num_args_checked > 0); // At least receiver check is necessary.
// Set up the function name and number of arguments (including the receiver)
// to the InstanceCall stub which will resolve the correct entrypoint for
« no previous file with comments | « no previous file | runtime/vm/compiler.cc » ('j') | runtime/vm/opt_code_generator_ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698