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

Unified Diff: runtime/vm/object.cc

Issue 1260163006: Detect missing inliner (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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
« runtime/vm/flow_graph_compiler.cc ('K') | « runtime/vm/flow_graph_compiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index fa292e3b09c57d9edf6273c2442b4f240a2573bb..8daa9d8a7197df3adde71c24a1adfedb1ed7385a 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -13294,28 +13294,46 @@ void Code::GetInlinedFunctionsAt(
void Code::DumpInlinedIntervals() const {
- OS::Print("Inlined intervals:\n");
+ LogBlock lb(Isolate::Current());
+ ISL_Print("Inlined intervals:\n");
const Array& intervals = Array::Handle(GetInlinedIntervals());
if (intervals.IsNull() || (intervals.Length() == 0)) return;
Smi& start = Smi::Handle();
Smi& inlining_id = Smi::Handle();
Smi& caller_id = Smi::Handle();
+ GrowableArray<Function*> inlined_functions;
+ const Function& inliner = Function::Handle(function());
for (intptr_t i = 0; i < intervals.Length(); i += Code::kInlIntNumEntries) {
start ^= intervals.At(i + Code::kInlIntStart);
ASSERT(!start.IsNull());
if (start.IsNull()) continue;
inlining_id ^= intervals.At(i + Code::kInlIntInliningId);
caller_id ^= intervals.At(i + Code::kInlIntCallerId);
- OS::Print(" %" Px " id: %" Pd " caller-id: %" Pd " \n",
+ ISL_Print(" %" Px " id: %" Pd " caller-id: %" Pd " \n",
start.Value(), inlining_id.Value(), caller_id.Value());
+ inlined_functions.Clear();
+ ISL_Print("Inlined functions at: %" Px "\n", start.Value());
+ GetInlinedFunctionsAt(start.Value(), &inlined_functions);
+ for (intptr_t j = 0; j < inlined_functions.length(); j++) {
+ Function* function = inlined_functions[j];
+ if (j == inlined_functions.length() - 1) {
+ if (function->raw() != inliner.raw()) {
+ ISL_Print("!!! INLINER: %s\n", inliner.ToCString());
+ Isolate::Current()->Log()->Flush();
+ }
+ ASSERT(function->raw() == inliner.raw());
+ }
+ ISL_Print("%" Pd ": %s\n", j, function->ToCString());
+ }
+ ISL_Print("INLINER: %s\n", inliner.ToCString());
}
- OS::Print("Inlined ids:\n");
+ ISL_Print("Inlined ids:\n");
const Array& id_map = Array::Handle(GetInlinedIdToFunction());
Function& function = Function::Handle();
for (intptr_t i = 0; i < id_map.Length(); i++) {
function ^= id_map.At(i);
if (!function.IsNull()) {
- OS::Print(" %" Pd ": %s\n", i, function.ToQualifiedCString());
+ ISL_Print(" %" Pd ": %s\n", i, function.ToQualifiedCString());
}
}
}
« runtime/vm/flow_graph_compiler.cc ('K') | « runtime/vm/flow_graph_compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698