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

Unified Diff: runtime/vm/source_report.h

Issue 1566793002: Expose the new _getSourceReport api in the service protocol. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code rev Created 4 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 | « runtime/vm/service.cc ('k') | runtime/vm/source_report.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/source_report.h
diff --git a/runtime/vm/source_report.h b/runtime/vm/source_report.h
index 69529d3934aea122f25358b35d0c474220d0e7e6..09c809294e82e22bf3804fe3943be35c131ee0d0 100644
--- a/runtime/vm/source_report.h
+++ b/runtime/vm/source_report.h
@@ -18,8 +18,8 @@ namespace dart {
class SourceReport {
public:
enum ReportKind {
- kCallSites,
- kCoverage,
+ kCallSites = 0x1,
+ kCoverage = 0x2,
};
enum CompileMode {
@@ -27,7 +27,9 @@ class SourceReport {
kForceCompile
};
- explicit SourceReport(ReportKind report_kind,
+ // report_set is a bitvector indicating which reports to generate
+ // (e.g. kCallSites | kCoverage).
+ explicit SourceReport(intptr_t report_set,
CompileMode compile = kNoCompile);
// Generate a source report for (some subrange of) a script.
@@ -44,6 +46,7 @@ class SourceReport {
Thread* thread() const { return thread_; }
Zone* zone() const { return thread_->zone(); }
+ bool IsReportRequested(ReportKind report_kind);
bool ShouldSkipFunction(const Function& func);
intptr_t GetScriptIndex(const Script& script);
bool ScriptIsLoadedByLibrary(const Script& script, const Library& lib);
@@ -90,7 +93,7 @@ class SourceReport {
}
};
- ReportKind report_kind_;
+ intptr_t report_set_;
CompileMode compile_mode_;
Thread* thread_;
const Script* script_;
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/source_report.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698