Chromium Code Reviews| Index: src/profiler/cpu-profiler.cc |
| diff --git a/src/profiler/cpu-profiler.cc b/src/profiler/cpu-profiler.cc |
| index b0416ec2e9b3494232760bcf6ff13cbecd2e8f3d..439125a08d62b6216928c4a8a9951bdfccb4206c 100644 |
| --- a/src/profiler/cpu-profiler.cc |
| +++ b/src/profiler/cpu-profiler.cc |
| @@ -23,18 +23,11 @@ class CpuSampler : public sampler::Sampler { |
| : sampler::Sampler(reinterpret_cast<v8::Isolate*>(isolate)), |
| processor_(processor) {} |
| - 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, ®s)) return; |
| -#else |
| - const v8::RegisterState& regs = state; |
| -#endif |
| + void SampleStack(const v8::RegisterState& regs) override { |
| TickSample* sample = processor_->StartTickSample(); |
| - if (sample == NULL) return; |
| - sample->Init(i_isolate, regs, TickSample::kIncludeCEntryFrame, true); |
| + if (sample == nullptr) return; |
| + Isolate* isolate = reinterpret_cast<Isolate*>(this->isolate()); |
|
lpy
2016/07/07 17:57:56
Same here.
|
| + sample->Init(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_; |