Index: include/v8-profiler.h |
diff --git a/include/v8-profiler.h b/include/v8-profiler.h |
index 7fc193db58e9ded01a0b857c33134d0aed6b31d1..dbb6d3ba9370a1ba663542f37ce287d5638d6bae 100644 |
--- a/include/v8-profiler.h |
+++ b/include/v8-profiler.h |
@@ -22,6 +22,14 @@ typedef uint32_t SnapshotObjectId; |
*/ |
class V8_EXPORT CpuProfileNode { |
public: |
+ typedef struct { |
yurys
2014/08/08 08:13:23
style: we use C++ style for struct declaration.
s
|
+ /** The 1-based number of the source line where the function originates. */ |
+ int line; |
yurys
2014/08/08 08:13:23
How about providing column as well which I already
Denis Pravdin
2014/08/11 05:35:31
The minified sources is useful to reduce the amoun
|
+ |
+ /** The count of samples associated with the source line. */ |
+ unsigned int hit_count; |
+ } LineTick; |
+ |
/** 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 number) const; |
+ |
/** Returns bailout reason for the function |
* if the optimization was disabled for it. |
*/ |