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

Unified Diff: src/debug/debug-coverage.h

Issue 2766573003: [debug] introduce precise binary code coverage. (Closed)
Patch Set: fix test Created 3 years, 9 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/d8.cc ('k') | src/debug/debug-coverage.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug-coverage.h
diff --git a/src/debug/debug-coverage.h b/src/debug/debug-coverage.h
index 02c89e63f9ddff01e72dc7f382bcca90cb9abb40..e923fc4b21cb88a7d3b4b017a7042a12e02b27cd 100644
--- a/src/debug/debug-coverage.h
+++ b/src/debug/debug-coverage.h
@@ -35,14 +35,23 @@ struct CoverageScript {
class Coverage : public std::vector<CoverageScript> {
public:
- // Allocate a new Coverage object and populate with result.
- // The ownership is transferred to the caller.
- static Coverage* Collect(Isolate* isolate, bool reset_count);
+ // Collecting precise coverage only works if the modes kPreciseCount or
+ // kPreciseBinary is selected. The invocation count is reset on collection.
+ // In case of kPreciseCount, an updated count since last collection is
+ // returned. In case of kPreciseBinary, a count of 1 is returned if a
+ // function has been executed for the first time since last collection.
+ static Coverage* CollectPrecise(Isolate* isolate);
+ // Collecting best effort coverage always works, but may be imprecise
+ // depending on selected mode. The invocation count is not reset.
+ static Coverage* CollectBestEffort(Isolate* isolate);
// Select code coverage mode.
static void SelectMode(Isolate* isolate, debug::Coverage::Mode mode);
private:
+ static Coverage* Collect(Isolate* isolate,
+ v8::debug::Coverage::Mode collectionMode);
+
Coverage() {}
};
« no previous file with comments | « src/d8.cc ('k') | src/debug/debug-coverage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698