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

Unified Diff: src/log.cc

Issue 2128613004: Move SimulatorHelper into V8 out of profiler clients. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressing comments. 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/api.cc ('k') | src/profiler/cpu-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index f7607783e3180ee1cdf5906dec6e1da3e49cf1c4..fd89facffa16886f914a905b7da3b87c62673ac7 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -619,10 +619,10 @@ class Profiler: public base::Thread {
//
class Ticker: public sampler::Sampler {
public:
- Ticker(Isolate* isolate, int interval):
- sampler::Sampler(reinterpret_cast<v8::Isolate*>(isolate)),
- profiler_(NULL),
- sampling_thread_(new SamplingThread(this, interval)) {}
+ Ticker(Isolate* isolate, int interval)
+ : sampler::Sampler(reinterpret_cast<v8::Isolate*>(isolate)),
+ profiler_(nullptr),
+ sampling_thread_(new SamplingThread(this, interval)) {}
~Ticker() {
if (IsActive()) Stop();
@@ -630,7 +630,7 @@ class Ticker: public sampler::Sampler {
}
void SetProfiler(Profiler* profiler) {
- DCHECK(profiler_ == NULL);
+ DCHECK(profiler_ == nullptr);
profiler_ = profiler;
IncreaseProfilingDepth();
if (!IsActive()) Start();
@@ -638,7 +638,7 @@ class Ticker: public sampler::Sampler {
}
void ClearProfiler() {
- profiler_ = NULL;
+ profiler_ = nullptr;
if (IsActive()) Stop();
DecreaseProfilingDepth();
sampling_thread_->Join();
@@ -646,15 +646,9 @@ class Ticker: public sampler::Sampler {
void SampleStack(const v8::RegisterState& state) override {
if (!profiler_) return;
- v8::Isolate* v8_isolate = isolate();
- Isolate* i_isolate = reinterpret_cast<Isolate*>(v8_isolate);
-#if defined(USE_SIMULATOR)
- if (!SimulatorHelper::FillRegisters(i_isolate,
- const_cast<v8::RegisterState*>(&state)))
- return;
-#endif
+ Isolate* isolate = reinterpret_cast<Isolate*>(this->isolate());
TickSample sample;
- sample.Init(i_isolate, state, TickSample::kIncludeCEntryFrame, true);
+ sample.Init(isolate, state, TickSample::kIncludeCEntryFrame, true);
profiler_->Insert(&sample);
}
« no previous file with comments | « src/api.cc ('k') | src/profiler/cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698