Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 64c00220f30712a97a97be861d6af44605b5280f..26db0de73b747f187d027fb2ae5fffae0d32392e 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -6454,6 +6454,11 @@ unsigned CpuProfileNode::GetCallUid() const { |
} |
+unsigned CpuProfileNode::GetNodeId() const { |
+ return reinterpret_cast<const i::ProfileNode*>(this)->id(); |
+} |
+ |
+ |
int CpuProfileNode::GetChildrenCount() const { |
i::Isolate* isolate = i::Isolate::Current(); |
IsDeadCheck(isolate, "v8::CpuProfileNode::GetChildrenCount"); |
@@ -6506,6 +6511,17 @@ const CpuProfileNode* CpuProfile::GetTopDownRoot() const { |
} |
+const CpuProfileNode* CpuProfile::GetSample(int index) const { |
+ const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); |
+ return reinterpret_cast<const CpuProfileNode*>(profile->sample(index)); |
+} |
+ |
+ |
+int CpuProfile::GetSamplesCount() const { |
+ return reinterpret_cast<const i::CpuProfile*>(this)->samples_count(); |
+} |
+ |
+ |
int CpuProfiler::GetProfilesCount() { |
i::Isolate* isolate = i::Isolate::Current(); |
IsDeadCheck(isolate, "v8::CpuProfiler::GetProfilesCount"); |
@@ -6535,10 +6551,10 @@ const CpuProfile* CpuProfiler::FindProfile(unsigned uid, |
} |
-void CpuProfiler::StartProfiling(Handle<String> title) { |
+void CpuProfiler::StartProfiling(Handle<String> title, bool record_samples) { |
i::Isolate* isolate = i::Isolate::Current(); |
IsDeadCheck(isolate, "v8::CpuProfiler::StartProfiling"); |
- i::CpuProfiler::StartProfiling(*Utils::OpenHandle(*title)); |
+ i::CpuProfiler::StartProfiling(*Utils::OpenHandle(*title), record_samples); |
} |