Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: src/api.cc

Issue 1555553002: [profiler] Implement POC Sampling Heap Profiler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix warning + minor cleanup in AllocateNode Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 8ff302f8d82702fa40c471082186a28ed91c8e90..9f7b070cce5abb9a341db456511d1f3fd8d90787 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -8281,6 +8281,28 @@ SnapshotObjectId HeapProfiler::GetHeapStats(OutputStream* stream,
}
+bool HeapProfiler::StartSamplingHeapProfiler(uint64_t sample_interval,
+ int stack_depth) {
+ return reinterpret_cast<i::HeapProfiler*>(this)
+ ->StartSamplingHeapProfiler(sample_interval, stack_depth);
+}
+
+
+void HeapProfiler::StopSamplingHeapProfiler() {
+ reinterpret_cast<i::HeapProfiler*>(this)->StopSamplingHeapProfiler();
+}
+
+
+AllocationProfile HeapProfiler::GetAllocationProfile() {
+ return reinterpret_cast<i::HeapProfiler*>(this)->GetAllocationProfile();
+}
+
+
+AllocationProfile::Node* AllocationProfile::GetRootNode() {
+ return nodes.size() == 0 ? nullptr : &nodes.front();
+}
+
+
void HeapProfiler::DeleteAllHeapSnapshots() {
reinterpret_cast<i::HeapProfiler*>(this)->DeleteAllSnapshots();
}
« no previous file with comments | « include/v8-profiler.h ('k') | src/heap/heap.h » ('j') | test/cctest/test-heap-profiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698