Chromium Code Reviews| Index: src/debug/debug-interface.h |
| diff --git a/src/debug/debug-interface.h b/src/debug/debug-interface.h |
| index ffe34c112ebb4c521bf4c7b0c54590450c550110..eb3af74e55c042a63ddcee62de0cdc9a5751c5b3 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. See go/v8-designdoc-block-code-coverage. |
|
Michael Starzinger
2017/06/06 11:49:32
The "go" short-links are not available to people o
jgruber
2017/06/06 14:52:46
Done, changed to goo.gl shortened link and dropped
|
| + 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) |