Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 136a7f2327ced3d72bc655efe9df7757a7d9acbd..35cf94cdc31179f222024916870fe06e683630fb 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -6454,6 +6454,13 @@ unsigned CpuProfileNode::GetCallUid() const { |
} |
+unsigned CpuProfileNode::GetNodeId() const { |
+ i::Isolate* isolate = i::Isolate::Current(); |
+ IsDeadCheck(isolate, "v8::CpuProfileNode::GetNodeId"); |
+ 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 +6513,21 @@ const CpuProfileNode* CpuProfile::GetTopDownRoot() const { |
} |
+const CpuProfileNode* CpuProfile::GetSample(int index) const { |
+ i::Isolate* isolate = i::Isolate::Current(); |
+ IsDeadCheck(isolate, "v8::CpuProfile::GetSample"); |
+ const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); |
+ return reinterpret_cast<const CpuProfileNode*>(profile->sample(index)); |
+} |
+ |
+ |
+int CpuProfile::GetSamplesCount() const { |
+ i::Isolate* isolate = i::Isolate::Current(); |
+ IsDeadCheck(isolate, "v8::CpuProfile::GetSamplesCount"); |
+ 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 +6557,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); |
} |