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

Unified Diff: src/sampler.cc

Issue 146803002: A64: Skip samples that have sp = 0 in CPU profiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/sampler.cc
diff --git a/src/sampler.cc b/src/sampler.cc
index 0b11725fe99d557a68c66ceb7ee105d64d884eec..8de34243724b9723ef4f92603c857dc4913cc689 100644
--- a/src/sampler.cc
+++ b/src/sampler.cc
@@ -340,6 +340,11 @@ void SignalHandler::HandleProfilerSignal(int signal, siginfo_t* info,
#if defined(USE_SIMULATOR)
helper.FillRegisters(sample);
+ // It possible that the simulator is interrupted while it is updating
+ // the sp register. A64 simulator does this in two steps:
+ // first setting it to zero and then setting it to the new value.
+ // Bailout if sp doesn't contain the new value.
+ if (sample->sp == 0) return;
#else
// Extracting the sample from the context is extremely machine dependent.
ucontext_t* ucontext = reinterpret_cast<ucontext_t*>(context);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698