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

Unified Diff: runtime/vm/compiler.cc

Issue 10823131: Add deopt info to code object and print it (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 months 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/deopt_instructions.h » ('j') | runtime/vm/deopt_instructions.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
===================================================================
--- runtime/vm/compiler.cc (revision 10252)
+++ runtime/vm/compiler.cc (working copy)
@@ -217,6 +217,7 @@
const Code& code = Code::Handle(Code::FinalizeCode(function, &assembler));
code.set_is_optimized(optimized);
graph_compiler.FinalizePcDescriptors(code);
+ graph_compiler.FinalizeDeoptInfo(code);
graph_compiler.FinalizeStackmaps(code);
graph_compiler.FinalizeVarDescriptors(code);
graph_compiler.FinalizeExceptionHandlers(code);
@@ -321,11 +322,29 @@
}
OS::Print("}\n");
OS::Print("PC Descriptors for function '%s' {\n", function_fullname);
- OS::Print("(pc\t\tkind\tid\ttry-ix\ttoken-index)\n");
+ OS::Print("(pc\t\tkind\t\tid\ttok-ix\ttry/deopt-ix)\n");
const PcDescriptors& descriptors =
PcDescriptors::Handle(code.pc_descriptors());
OS::Print("%s", descriptors.ToCString());
- OS::Print("}\n");
+ OS::Print("\n}\n");
siva 2012/08/04 01:21:50 Could you move the \n to %s\n" above so that this
srdjan 2012/08/06 20:09:05 Done.
+ const Array& deopt_info_array = Array::Handle(code.deopt_info_array());
+ if (deopt_info_array.Length() > 0) {
+ OS::Print("DeoptInfo: {\n");
+ for (intptr_t i = 0; i < deopt_info_array.Length(); i++) {
+ OS::Print(" %d: %s\n",
+ i, Object::Handle(deopt_info_array.At(i)).ToCString());
+ }
+ OS::Print("}\n");
+ }
+ const Array& object_table = Array::Handle(code.object_table());
+ if (object_table.Length() > 0) {
+ OS::Print("Object Table: {\n");
+ for (intptr_t i = 0; i < object_table.Length(); i++) {
+ OS::Print(" %d: %s\n", i,
+ Object::Handle(object_table.At(i)).ToCString());
+ }
+ OS::Print("}\n");
+ }
OS::Print("Variable Descriptors for function '%s' {\n",
function_fullname);
const LocalVarDescriptors& var_descriptors =
@@ -496,5 +515,4 @@
return Object::null();
}
-
} // namespace dart
« no previous file with comments | « no previous file | runtime/vm/deopt_instructions.h » ('j') | runtime/vm/deopt_instructions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698