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

Unified Diff: runtime/vm/code_generator.cc

Issue 11607018: Cleanup: Don't allocate a frame iterator in the IC miss handler when it's not needed. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
===================================================================
--- runtime/vm/code_generator.cc (revision 16438)
+++ runtime/vm/code_generator.cc (working copy)
@@ -893,9 +893,6 @@
const Function& target_function =
Function::Handle(target_code.function());
ASSERT(!target_function.IsNull());
- DartFrameIterator iterator;
- StackFrame* caller_frame = iterator.NextFrame();
- ASSERT(caller_frame != NULL);
if (args.length() == 1) {
ic_data.AddReceiverCheck(Class::Handle(args[0]->clazz()).id(),
target_function);
@@ -907,23 +904,28 @@
}
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(),
+ if (FLAG_trace_ic_miss_in_optimized || FLAG_trace_ic) {
+ DartFrameIterator iterator;
+ StackFrame* caller_frame = iterator.NextFrame();
+ ASSERT(caller_frame != NULL);
+ 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",
+ args.length(),
+ caller_frame->pc(),
+ Class::Handle(receiver.clazz()).ToCString(),
+ Class::Handle(receiver.clazz()).id(),
target_function.ToCString());
}
}
- if (FLAG_trace_ic) {
- OS::Print("InlineCacheMissHandler %d call at %#"Px"' "
- "adding <%s> id:%"Pd" -> <%s>\n",
- args.length(),
- caller_frame->pc(),
- Class::Handle(receiver.clazz()).ToCString(),
- Class::Handle(receiver.clazz()).id(),
- target_function.ToCString());
- }
return target_function.raw();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698