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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 10452006: Implement a heap profiler for the Dart managed heap. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: added basic test code Created 8 years, 7 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: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 48782f9f4a7236450544eee4d731ae7321ffe576..dea9dbcd8f535a1a60d177b19e88d43a98a939f7 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -608,6 +608,18 @@ DART_EXPORT Dart_Handle Dart_RemoveGcEpilogueCallback(
}
+DART_EXPORT Dart_Handle Dart_HeapProfile(Dart_HeapProfileWriteCallback callback,
+ void* stream) {
+ Isolate* isolate = Isolate::Current();
+ CHECK_ISOLATE(isolate);
+ if (callback == NULL) {
+ return Api::NewError("%s expects argument 'callback' to be non-null.",
+ CURRENT_FUNC);
+ }
+ isolate->heap()->Profile(callback, stream);
+ return Api::Success(isolate);
+}
+
// --- Initialization and Globals ---
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/freelist.h » ('j') | runtime/vm/heap_profiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698