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

Unified Diff: src/profiler/cpu-profiler.cc

Issue 2138643003: Revert three commits due to cpu-profiler failures (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
« no previous file with comments | « src/log.cc ('k') | src/profiler/profile-generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profiler/cpu-profiler.cc
diff --git a/src/profiler/cpu-profiler.cc b/src/profiler/cpu-profiler.cc
index 439125a08d62b6216928c4a8a9951bdfccb4206c..b0416ec2e9b3494232760bcf6ff13cbecd2e8f3d 100644
--- a/src/profiler/cpu-profiler.cc
+++ b/src/profiler/cpu-profiler.cc
@@ -23,11 +23,18 @@ class CpuSampler : public sampler::Sampler {
: sampler::Sampler(reinterpret_cast<v8::Isolate*>(isolate)),
processor_(processor) {}
- void SampleStack(const v8::RegisterState& regs) override {
+ void SampleStack(const v8::RegisterState& state) override {
+ v8::Isolate* v8_isolate = isolate();
+ Isolate* i_isolate = reinterpret_cast<Isolate*>(v8_isolate);
+#if defined(USE_SIMULATOR)
+ v8::RegisterState regs;
+ if (!SimulatorHelper::FillRegisters(i_isolate, &regs)) return;
+#else
+ const v8::RegisterState& regs = state;
+#endif
TickSample* sample = processor_->StartTickSample();
- if (sample == nullptr) return;
- Isolate* isolate = reinterpret_cast<Isolate*>(this->isolate());
- sample->Init(isolate, regs, TickSample::kIncludeCEntryFrame, true);
+ if (sample == NULL) return;
+ sample->Init(i_isolate, regs, TickSample::kIncludeCEntryFrame, true);
if (is_counting_samples_ && !sample->timestamp.IsNull()) {
if (sample->state == JS) ++js_sample_count_;
if (sample->state == EXTERNAL) ++external_sample_count_;
« no previous file with comments | « src/log.cc ('k') | src/profiler/profile-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698