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

Unified Diff: src/log.cc

Issue 2108393002: Split Ticker into two samplers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | src/profiler/cpu-profiler.h » ('j') | src/profiler/cpu-profiler.h » ('J')
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 3e7677edf1955400cae41889f69e06544b8e7301..663c0e44e0b31ed5858045fed856081e33fd93c1 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -651,18 +651,13 @@ class Ticker: public sampler::Sampler {
const_cast<v8::RegisterState*>(&state)))
return;
#endif
- TickSample* sample = isolate->cpu_profiler()->StartTickSample();
- TickSample sample_obj;
- if (sample == NULL) sample = &sample_obj;
- sample->Init(isolate, state, TickSample::kIncludeCEntryFrame, true);
- if (is_counting_samples_ && !sample->timestamp.IsNull()) {
- if (sample->state == JS) ++js_sample_count_;
- if (sample->state == EXTERNAL) ++external_sample_count_;
- }
- if (profiler_) profiler_->Insert(sample);
- if (sample != &sample_obj) {
- isolate->cpu_profiler()->FinishTickSample();
+ TickSample sample;
+ sample.Init(isolate, state, TickSample::kIncludeCEntryFrame, true);
+ if (is_counting_samples_ && !sample.timestamp.IsNull()) {
alph 2016/06/30 01:21:01 Is it used in the profiler tests? If not, you can
lpy 2016/06/30 21:13:03 Done.
+ if (sample.state == JS) ++js_sample_count_;
+ if (sample.state == EXTERNAL) ++external_sample_count_;
}
+ if (profiler_) profiler_->Insert(&sample);
}
private:
« no previous file with comments | « no previous file | src/profiler/cpu-profiler.h » ('j') | src/profiler/cpu-profiler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698