Chromium Code Reviews| Index: runtime/vm/dart_api_impl.cc |
| diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc |
| index e49523fb73a38f0e434f44a8c58be8f720b3103f..adbe9ce6a667d4b422d14f734112df688a0d3eb4 100644 |
| --- a/runtime/vm/dart_api_impl.cc |
| +++ b/runtime/vm/dart_api_impl.cc |
| @@ -4429,38 +4429,19 @@ DART_EXPORT Dart_Handle Dart_SetNativeResolver( |
| } |
| -// --- Profiling support ---- |
| +// --- Profiling support --- |
|
Max Heinritz (Google)
2012/12/21 18:51:27
Added pprof symbols back to API.
|
| +// TODO(7565): Dartium should use the new VM flag "generate_pprof_symbols" for |
| +// pprof profiling. Then these symbols should be removed. |
| -DART_EXPORT void Dart_InitPprofSupport() { |
| - DebugInfo* pprof_symbol_generator = DebugInfo::NewGenerator(); |
| - ASSERT(pprof_symbol_generator != NULL); |
| - Dart::set_pprof_symbol_generator(pprof_symbol_generator); |
| -} |
| - |
| +DART_EXPORT void Dart_InitPprofSupport() { } |
| DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size) { |
| - Isolate* isolate = Isolate::Current(); |
| - DebugInfo* pprof_symbol_generator = Dart::pprof_symbol_generator(); |
| - if (pprof_symbol_generator != NULL) { |
| - DebugInfo::ByteBuffer* debug_region = new DebugInfo::ByteBuffer(); |
| - ASSERT(debug_region != NULL); |
| - pprof_symbol_generator->WriteToMemory(debug_region); |
| - *buffer_size = debug_region->size(); |
| - if (*buffer_size != 0) { |
| - Zone* zone = Api::TopScope(isolate)->zone(); |
| - *buffer = reinterpret_cast<void*>(zone->AllocUnsafe(*buffer_size)); |
| - memmove(*buffer, debug_region->data(), *buffer_size); |
| - } else { |
| - *buffer = NULL; |
| - } |
| - delete debug_region; |
| - } else { |
| - *buffer = NULL; |
| - *buffer_size = 0; |
| - } |
| + *buffer = NULL; |
| + *buffer_size = 0; |
| } |
| + |
| // --- Peer support --- |