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

Unified Diff: src/sampler.cc

Issue 148883002: Synchronize with r15594. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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/sampler.h ('k') | src/stub-cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/sampler.cc
diff --git a/src/sampler.cc b/src/sampler.cc
index 91f1bb0ddbfd59761ea4d6db3c8661d181f85ff1..624a96f6092d7f1771337665ecb1b494f73ff607 100644
--- a/src/sampler.cc
+++ b/src/sampler.cc
@@ -685,7 +685,8 @@ Sampler::Sampler(Isolate* isolate, int interval)
interval_(interval),
profiling_(false),
active_(false),
- samples_taken_(0) {
+ is_counting_samples_(false),
+ js_and_external_sample_count_(0) {
data_ = new PlatformData;
}
@@ -715,7 +716,11 @@ void Sampler::SampleStack(const RegisterState& state) {
TickSample sample_obj;
if (sample == NULL) sample = &sample_obj;
sample->Init(isolate_, state);
- if (++samples_taken_ < 0) samples_taken_ = 0;
+ if (is_counting_samples_) {
+ if (sample->state == JS || sample->state == EXTERNAL) {
+ ++js_and_external_sample_count_;
+ }
+ }
Tick(sample);
}
« no previous file with comments | « src/sampler.h ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698