Index: runtime/vm/profiler_service.cc |
diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc |
index 1aba7d3243c34f5a388363f01076bb15c84efd92..17a8a73ddcaadad6952a3a45af3a86d0beb9de78 100644 |
--- a/runtime/vm/profiler_service.cc |
+++ b/runtime/vm/profiler_service.cc |
@@ -1390,6 +1390,11 @@ class ProfileBuilder : public ValueObject { |
GrowableArray<Function*> inlined_functions; |
if (!code.IsNull()) { |
intptr_t offset = pc - code.EntryPoint(); |
+ if (frame_index != 0) { |
+ // The PC of frames below the top frame is a call's return address, |
+ // which can belong to a different inlining interval than the call. |
+ offset--; |
+ } |
code.GetInlinedFunctionsAt(offset, &inlined_functions); |
} |
if (code.IsNull() || (inlined_functions.length() == 0)) { |