Index: runtime/vm/profiler_service.cc |
diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc |
index 7ea7d3b129cc138ebf54bb7b7f3494861c74cffb..4e371794ca55f50128f9d594f34be0c78b54fef5 100644 |
--- a/runtime/vm/profiler_service.cc |
+++ b/runtime/vm/profiler_service.cc |
@@ -1876,6 +1876,16 @@ class ProfileBuilder : public ValueObject { |
code.compile_timestamp(), |
code); |
} |
+ // Precompiled instructions are in the VM isolate, but the code (except |
+ // stubs) is in the current isolate. |
+ code ^= Code::LookupCode(pc); |
+ if (!code.IsNull()) { |
+ return new ProfileCode(ProfileCode::kDartCode, |
+ code.EntryPoint(), |
+ code.EntryPoint() + code.Size(), |
+ code.compile_timestamp(), |
+ code); |
+ } |
return new ProfileCode(ProfileCode::kCollectedCode, |
pc, |
(pc & kDartCodeAlignmentMask) + kDartCodeAlignment, |