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

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: address final review comments Created 8 years, 6 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
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 3aefd6ada89488c6d3a599f9e197386dcb6b0843..2478437c5c4a0c6bf724bcbf38dca39e4362ce96 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -670,6 +670,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/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698