| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/globals.h" | 5 #include "platform/globals.h" |
| 6 | 6 |
| 7 #if !defined(DART_USE_TCMALLOC) || defined(PRODUCT) || \ | 7 #if !defined(DART_USE_TCMALLOC) || defined(PRODUCT) |
| 8 defined(TARGET_ARCH_DBC) || defined(TARGET_OS_FUCHSIA) | |
| 9 | 8 |
| 10 #include "vm/malloc_hooks.h" | 9 #include "vm/malloc_hooks.h" |
| 11 | 10 |
| 12 namespace dart { | 11 namespace dart { |
| 13 | 12 |
| 14 void MallocHooks::InitOnce() { | 13 void MallocHooks::InitOnce() { |
| 15 // Do nothing. | 14 // Do nothing. |
| 16 } | 15 } |
| 17 | 16 |
| 18 | 17 |
| 19 void MallocHooks::TearDown() { | 18 void MallocHooks::TearDown() { |
| 20 // Do nothing. | 19 // Do nothing. |
| 21 } | 20 } |
| 22 | 21 |
| 23 | 22 |
| 24 bool MallocHooks::ProfilingEnabled() { | |
| 25 return false; | |
| 26 } | |
| 27 | |
| 28 | |
| 29 bool MallocHooks::stack_trace_collection_enabled() { | |
| 30 return false; | |
| 31 } | |
| 32 | |
| 33 | |
| 34 void MallocHooks::set_stack_trace_collection_enabled(bool enabled) { | |
| 35 // Do nothing. | |
| 36 } | |
| 37 | |
| 38 | |
| 39 void MallocHooks::ResetStats() { | 23 void MallocHooks::ResetStats() { |
| 40 // Do nothing. | 24 // Do nothing. |
| 41 } | 25 } |
| 42 | 26 |
| 43 | 27 |
| 44 bool MallocHooks::Active() { | 28 bool MallocHooks::Active() { |
| 45 return false; | 29 return false; |
| 46 } | 30 } |
| 47 | 31 |
| 48 | 32 |
| 49 void MallocHooks::PrintToJSONObject(JSONObject* jsobj) { | 33 void MallocHooks::PrintToJSONObject(JSONObject* jsobj) { |
| 50 // Do nothing. | 34 // Do nothing. |
| 51 } | 35 } |
| 52 | 36 |
| 53 | 37 |
| 54 intptr_t MallocHooks::allocation_count() { | 38 intptr_t MallocHooks::allocation_count() { |
| 55 return 0; | 39 return 0; |
| 56 } | 40 } |
| 57 | 41 |
| 58 | 42 |
| 59 intptr_t MallocHooks::heap_allocated_memory_in_bytes() { | 43 intptr_t MallocHooks::heap_allocated_memory_in_bytes() { |
| 60 return 0; | 44 return 0; |
| 61 } | 45 } |
| 62 | 46 |
| 63 } // namespace dart | 47 } // namespace dart |
| 64 | 48 |
| 65 #endif // !defined(DART_USE_TCMALLOC) || defined(PRODUCT) || | 49 #endif // defined(DART_USE_TCMALLOC) || defined(PRODUCT) |
| 66 // defined(TARGET_ARCH_DBC) || defined(TARGET_OS_FUCHSIA) | |
| OLD | NEW |