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

Side by Side Diff: runtime/vm/malloc_hooks_unsupported.cc

Issue 2680213002: Updated MallocHooks to collect stack traces when memory is allocated. (Closed)
Patch Set: Updated MallocHooks to collect stack traces when memory is allocated. Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/malloc_hooks_test.cc ('k') | runtime/vm/os.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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)
8 9
9 #include "vm/malloc_hooks.h" 10 #include "vm/malloc_hooks.h"
10 11
11 namespace dart { 12 namespace dart {
12 13
13 void MallocHooks::InitOnce() { 14 void MallocHooks::InitOnce() {
14 // Do nothing. 15 // Do nothing.
15 } 16 }
16 17
17 18
18 void MallocHooks::TearDown() { 19 void MallocHooks::TearDown() {
19 // Do nothing. 20 // Do nothing.
20 } 21 }
21 22
22 23
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
23 void MallocHooks::ResetStats() { 39 void MallocHooks::ResetStats() {
24 // Do nothing. 40 // Do nothing.
25 } 41 }
26 42
27 43
28 bool MallocHooks::Active() { 44 bool MallocHooks::Active() {
29 return false; 45 return false;
30 } 46 }
31 47
32 48
33 void MallocHooks::PrintToJSONObject(JSONObject* jsobj) { 49 void MallocHooks::PrintToJSONObject(JSONObject* jsobj) {
34 // Do nothing. 50 // Do nothing.
35 } 51 }
36 52
37 53
38 intptr_t MallocHooks::allocation_count() { 54 intptr_t MallocHooks::allocation_count() {
39 return 0; 55 return 0;
40 } 56 }
41 57
42 58
43 intptr_t MallocHooks::heap_allocated_memory_in_bytes() { 59 intptr_t MallocHooks::heap_allocated_memory_in_bytes() {
44 return 0; 60 return 0;
45 } 61 }
46 62
47 } // namespace dart 63 } // namespace dart
48 64
49 #endif // defined(DART_USE_TCMALLOC) || defined(PRODUCT) 65 #endif // !defined(DART_USE_TCMALLOC) || defined(PRODUCT) ||
66 // defined(TARGET_ARCH_DBC) || defined(TARGET_OS_FUCHSIA)
OLDNEW
« no previous file with comments | « runtime/vm/malloc_hooks_test.cc ('k') | runtime/vm/os.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698