| Index: runtime/vm/code_generator.cc
|
| ===================================================================
|
| --- runtime/vm/code_generator.cc (revision 12183)
|
| +++ runtime/vm/code_generator.cc (working copy)
|
| @@ -32,6 +32,8 @@
|
| DEFINE_FLAG(bool, inline_cache, true, "Enable inline caches");
|
| DEFINE_FLAG(bool, trace_deopt, false, "Trace deoptimization");
|
| DEFINE_FLAG(bool, trace_ic, false, "Trace IC handling");
|
| +DEFINE_FLAG(bool, trace_ic_miss_in_optimized, true,
|
| + "Trace IC miss in optimized code");
|
| DEFINE_FLAG(bool, trace_patching, false, "Trace patching of code.");
|
| DEFINE_FLAG(bool, trace_runtime_calls, false, "Trace runtime calls");
|
| DEFINE_FLAG(int, optimization_counter_threshold, 2000,
|
| @@ -920,6 +922,14 @@
|
| }
|
| ic_data.AddCheck(class_ids, target_function);
|
| }
|
| + if (FLAG_trace_ic_miss_in_optimized) {
|
| + const Code& caller = Code::Handle(Code::LookupCode(caller_frame->pc()));
|
| + if (caller.is_optimized()) {
|
| + OS::Print("IC miss in optimized code; call %s -> %s\n",
|
| + Function::Handle(caller.function()).ToCString(),
|
| + target_function.ToCString());
|
| + }
|
| + }
|
| if (FLAG_trace_ic) {
|
| OS::Print("InlineCacheMissHandler %d call at %#"Px"' "
|
| "adding <%s> id:%"Pd" -> <%s>\n",
|
|
|