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

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

Issue 2766573003: [debug] introduce precise binary code coverage. (Closed)
Patch Set: 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
Index: src/debug/debug-coverage.h
diff --git a/src/debug/debug-coverage.h b/src/debug/debug-coverage.h
index 02c89e63f9ddff01e72dc7f382bcca90cb9abb40..f37b8f37440fe7697054ecca2c8655bc8c598ed0 100644
--- a/src/debug/debug-coverage.h
+++ b/src/debug/debug-coverage.h
@@ -35,14 +35,22 @@ 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, bool reset_count);
+
Coverage() {}
};
« no previous file with comments | « src/d8.cc ('k') | src/debug/debug-coverage.cc » ('j') | src/debug/debug-coverage.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698