Index: include/v8-profiler.h |
diff --git a/include/v8-profiler.h b/include/v8-profiler.h |
index 90a3d4d41ca50cf21cfd8a35423105e00704ecf2..41fe8a19992a3a63a1fe829805e5a5d4e223ce46 100644 |
--- a/include/v8-profiler.h |
+++ b/include/v8-profiler.h |
@@ -105,6 +105,9 @@ class V8EXPORT CpuProfileNode { |
/** Returns function entry UID. */ |
unsigned GetCallUid() const; |
+ /** Returns id of the node. The id is unique within the tree */ |
+ unsigned GetNodeId() const; |
+ |
/** Returns child nodes count of the node. */ |
int GetChildrenCount() const; |
@@ -131,6 +134,18 @@ class V8EXPORT CpuProfile { |
const CpuProfileNode* GetTopDownRoot() const; |
/** |
+ * Returns number of samples recorded. The samples are not recorded unless |
+ * |record_samples| parameter of CpuProfiler::StartProfiling is true. |
+ */ |
+ int GetSamplesCount() const; |
+ |
+ /** |
+ * Returns profile node corresponding to the top frame the sample at |
+ * the given index. |
+ */ |
+ const CpuProfileNode* GetSample(int index) const; |
+ |
+ /** |
* Deletes the profile and removes it from CpuProfiler's list. |
* All pointers to nodes previously returned become invalid. |
* Profiles with the same uid but obtained using different |
@@ -179,8 +194,11 @@ class V8EXPORT CpuProfiler { |
* title are silently ignored. While collecting a profile, functions |
* from all security contexts are included in it. The token-based |
* filtering is only performed when querying for a profile. |
+ * |
+ * |record_samples| parameter controls whether individual samples should |
+ * be recorded in addition to the aggregated tree. |
*/ |
- static void StartProfiling(Handle<String> title); |
+ static void StartProfiling(Handle<String> title, bool record_samples = false); |
/** |
* Stops collecting CPU profile with a given title and returns it. |