Index: src/debug/debug-interface.h |
diff --git a/src/debug/debug-interface.h b/src/debug/debug-interface.h |
index ffe34c112ebb4c521bf4c7b0c54590450c550110..6ed383aeebf2b4ff1924a775ed3b1ea07cb46a8d 100644 |
--- a/src/debug/debug-interface.h |
+++ b/src/debug/debug-interface.h |
@@ -17,6 +17,7 @@ |
namespace v8 { |
namespace internal { |
+struct CoverageBlock; |
struct CoverageFunction; |
struct CoverageScript; |
class Coverage; |
@@ -245,10 +246,28 @@ class V8_EXPORT_PRIVATE Coverage { |
// We are only interested in a yes/no result for the function. Optimization |
// and GC can be allowed once a function has been invoked. Collecting |
// precise binary coverage resets counters for incremental updates. |
- kPreciseBinary |
+ kPreciseBinary, |
+ // Similar to the precise coverage modes but provides coverage at a |
+ // lower granularity. Design doc: goo.gl/lA2swZ. |
+ kBlockCount, |
}; |
- class ScriptData; // Forward declaration. |
+ // Forward declarations. |
+ class ScriptData; |
+ class FunctionData; |
+ |
+ class V8_EXPORT_PRIVATE BlockData { |
+ public: |
+ int StartOffset() const; |
+ int EndOffset() const; |
+ uint32_t Count() const; |
+ |
+ private: |
+ explicit BlockData(i::CoverageBlock* block) : block_(block) {} |
+ i::CoverageBlock* block_; |
+ |
+ friend class v8::debug::Coverage::FunctionData; |
+ }; |
class V8_EXPORT_PRIVATE FunctionData { |
public: |
@@ -256,6 +275,8 @@ class V8_EXPORT_PRIVATE Coverage { |
int EndOffset() const; |
uint32_t Count() const; |
MaybeLocal<String> Name() const; |
+ size_t BlockCount() const; |
+ BlockData GetBlockData(size_t i) const; |
private: |
explicit FunctionData(i::CoverageFunction* function) |