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

Unified Diff: runtime/vm/simulator_arm64.cc

Issue 718393005: Enable the profiler on the simulator (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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
Index: runtime/vm/simulator_arm64.cc
diff --git a/runtime/vm/simulator_arm64.cc b/runtime/vm/simulator_arm64.cc
index 6607c53b4d06685edf446290e2ab546c174c29ff..6f4c1201f4399a9d195abf3d99e46b7227b8c9b3 100644
--- a/runtime/vm/simulator_arm64.cc
+++ b/runtime/vm/simulator_arm64.cc
@@ -616,6 +616,16 @@ class Redirection {
return reinterpret_cast<Redirection*>(addr_of_redirection);
}
+ static uword FunctionForRedirect(uword address_of_hlt) {
+ Redirection* current;
+ for (current = list_; current != NULL; current = current->next_) {
+ if (current->address_of_hlt_instruction() == address_of_hlt) {
+ return current->external_function_;
+ }
+ }
+ return 0;
+ }
+
private:
static const int32_t kRedirectInstruction = Instr::kRedirectInstruction;
Redirection(uword external_function,
@@ -650,6 +660,11 @@ uword Simulator::RedirectExternalReference(uword function,
}
+uword Simulator::FunctionForRedirect(uword redirect) {
+ return Redirection::FunctionForRedirect(redirect);
+}
+
+
// Get the active Simulator for the current isolate.
Simulator* Simulator::Current() {
Simulator* simulator = Isolate::Current()->simulator();

Powered by Google App Engine
This is Rietveld 408576698