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

Unified Diff: src/api.cc

Issue 2189513002: Move SimulatorHelper into V8 out of profiler clients. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 553cf485d46090491ce302cbc4210856188fe3ca..77b81a80644b54357dfffe60958369aed7551f34 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -7703,20 +7703,15 @@ bool Isolate::GetHeapCodeAndMetadataStatistics(
void Isolate::GetStackSample(const RegisterState& state, void** frames,
size_t frames_limit, SampleInfo* sample_info) {
-#if defined(USE_SIMULATOR)
- RegisterState regs;
- i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
- if (!i::SimulatorHelper::FillRegisters(isolate, &regs)) {
- sample_info->frames_count = 0;
- sample_info->vm_state = OTHER;
- sample_info->external_callback_entry = nullptr;
+ RegisterState updated_state;
+ if (TickSample::GetStackSample(this, state, updated_state,
+ TickSample::kSkipCEntryFrame, frames,
+ frames_limit, sample_info)) {
return;
}
-#else
- const RegisterState& regs = state;
-#endif
- TickSample::GetStackSample(this, regs, TickSample::kSkipCEntryFrame, frames,
- frames_limit, sample_info);
+ sample_info->frames_count = 0;
+ sample_info->vm_state = OTHER;
+ sample_info->external_callback_entry = nullptr;
}
size_t Isolate::NumberOfPhantomHandleResetsSinceLastCall() {
« include/v8-profiler.h ('K') | « include/v8-profiler.h ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698