Index: include/v8-profiler.h |
diff --git a/include/v8-profiler.h b/include/v8-profiler.h |
index 7fc193db58e9ded01a0b857c33134d0aed6b31d1..d0215205f5fa97d8eadc1f2547df734f53c11a24 100644 |
--- a/include/v8-profiler.h |
+++ b/include/v8-profiler.h |
@@ -22,6 +22,14 @@ typedef uint32_t SnapshotObjectId; |
*/ |
class V8_EXPORT CpuProfileNode { |
public: |
+ struct LineTick { |
+ /** The 1-based number of the source line where the function originates. */ |
+ int line; |
+ |
+ /** The count of samples associated with the source line. */ |
+ unsigned int hit_count; |
+ }; |
+ |
/** Returns function name (empty string for anonymous functions.) */ |
Handle<String> GetFunctionName() const; |
@@ -43,6 +51,18 @@ class V8_EXPORT CpuProfileNode { |
*/ |
int GetColumnNumber() const; |
+ /** |
+ * Returns the number of the function's source lines that collect the samples. |
+ */ |
+ unsigned int GetHitLineCount() const; |
+ |
+ /** Returns the set of source lines that collect the samples. |
+ * The caller allocates buffer and responsible for releasing it. |
+ * True if all available entries are copied, otherwise false. |
+ * The function copies nothing if buffer is not large enough. |
+ */ |
+ bool GetLineTicks(LineTick* entries, unsigned int length) const; |
+ |
/** Returns bailout reason for the function |
* if the optimization was disabled for it. |
*/ |