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

Unified Diff: src/profiler/sampler.cc

Issue 1695663002: Unflake SampleWhenFrameIsNotSetup (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/profiler/sampler.h ('k') | test/cctest/test-cpu-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profiler/sampler.cc
diff --git a/src/profiler/sampler.cc b/src/profiler/sampler.cc
index 1add4e71fdab35f33593dcf90e4fda1bd12f935e..45f1d4d3efcfd726409b16ec2aa80f0b673b0d92 100644
--- a/src/profiler/sampler.cc
+++ b/src/profiler/sampler.cc
@@ -745,7 +745,6 @@ void Sampler::TearDown() {
#endif
}
-
Sampler::Sampler(Isolate* isolate, int interval)
: isolate_(isolate),
interval_(interval),
@@ -753,17 +752,16 @@ Sampler::Sampler(Isolate* isolate, int interval)
has_processing_thread_(false),
active_(false),
is_counting_samples_(false),
- js_and_external_sample_count_(0) {
+ js_sample_count_(0),
+ external_sample_count_(0) {
data_ = new PlatformData;
}
-
Sampler::~Sampler() {
DCHECK(!IsActive());
delete data_;
}
-
void Sampler::Start() {
DCHECK(!IsActive());
SetActive(true);
@@ -800,9 +798,8 @@ void Sampler::SampleStack(const v8::RegisterState& state) {
if (sample == NULL) sample = &sample_obj;
sample->Init(isolate_, state, TickSample::kIncludeCEntryFrame, true);
if (is_counting_samples_) {
- if (sample->state == JS || sample->state == EXTERNAL) {
- ++js_and_external_sample_count_;
- }
+ if (sample->state == JS) ++js_sample_count_;
+ if (sample->state == EXTERNAL) ++external_sample_count_;
}
Tick(sample);
if (sample != &sample_obj) {
« no previous file with comments | « src/profiler/sampler.h ('k') | test/cctest/test-cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698