| 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());
|
| }
|
| }
|
| }
|
|
|