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

Unified Diff: runtime/include/dart_api.h

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: 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
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index c610c5e02353e707c27f6cf393c4e7514bd936ed..17ad1f175cd96cbcb522bba1e8e5aa578592ca35 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -100,6 +100,10 @@ typedef void (*Dart_WeakPersistentHandleFinalizer)(Dart_Handle handle,
void* peer);
typedef void (*Dart_PeerFinalizer)(void* peer);
+typedef void (*Dart_HeapProfileWriteCallback)(const void* data,
turnidge 2012/05/29 17:50:01 Maybe add short comment above this.
cshapiro 2012/06/01 04:27:02 Certainly. Done.
+ intptr_t length,
+ void* stream);
+
/**
* Is this an error handle?
*
@@ -384,6 +388,19 @@ DART_EXPORT Dart_Handle Dart_AddGcEpilogueCallback(
DART_EXPORT Dart_Handle Dart_RemoveGcEpilogueCallback(
Dart_GcEpilogueCallback callback);
+/**
+ * Generates a heap profile.
+ *
+ * \param callback A function pointer that will be repeatedly invoked
+ * with heap profile data.
+ * \param context A pointer that will be passed to the callback. This
+ * is a convenient way to provide an open stream to the callback.
+ *
+ * \return Success if the heap profile is successful.
+ */
+DART_EXPORT Dart_Handle Dart_HeapProfile(Dart_HeapProfileWriteCallback callback,
+ void* context);
+
// --- Initialization and Globals ---
/**
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698