| 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 ---
|
|
|
|
|
|
|