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() {} |
}; |