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

Unified Diff: runtime/vm/profiler.h

Issue 1541893002: Support narrowing a cpu profile to a given time window (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 | runtime/vm/profiler.cc » ('j') | runtime/vm/profiler_test.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler.h
diff --git a/runtime/vm/profiler.h b/runtime/vm/profiler.h
index e598e70089d75d8ad5766630e318a95255869f26..febff47b1a53344b3e2af89e95e2357268b46334 100644
--- a/runtime/vm/profiler.h
+++ b/runtime/vm/profiler.h
@@ -91,7 +91,12 @@ class SampleVisitor : public ValueObject {
class SampleFilter : public ValueObject {
public:
- explicit SampleFilter(Isolate* isolate) : isolate_(isolate) { }
+ explicit SampleFilter(Isolate* isolate,
+ int64_t time_origin_micros = -1,
+ int64_t time_extent_micros = -1)
siva 2015/12/21 20:43:27 I don't see any place where SampleFilter is constr
Cutch 2015/12/21 22:07:38 Done.
+ : isolate_(isolate),
+ time_origin_micros_(time_origin_micros),
+ time_extent_micros_(time_extent_micros) { }
siva 2015/12/21 20:43:28 ASSERT(time_origin_micros >= 0); ASSERT(time_exten
Cutch 2015/12/21 22:07:38 When these are -1 it means we don't have a TimeFil
siva 2015/12/22 17:08:23 Sorry I meant : ASSERT(time_origin_micros >= -1);
virtual ~SampleFilter() { }
// Override this function.
@@ -104,8 +109,14 @@ class SampleFilter : public ValueObject {
return isolate_;
}
+ // Returns |true| if |sample| passes the time filter.
+ bool TimeFilterSample(Sample* sample);
+
private:
Isolate* isolate_;
+
+ int64_t time_origin_micros_;
+ int64_t time_extent_micros_;
};
« no previous file with comments | « no previous file | runtime/vm/profiler.cc » ('j') | runtime/vm/profiler_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698