| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/trace_event/memory_infra_background_whitelist.h" | 5 #include "base/trace_event/memory_infra_background_whitelist.h" |
| 6 | 6 |
| 7 #include <ctype.h> | 7 #include <ctype.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 "LeveldbValueStore", | 28 "LeveldbValueStore", |
| 29 "Malloc", | 29 "Malloc", |
| 30 "MemoryCache", | 30 "MemoryCache", |
| 31 "PartitionAlloc", | 31 "PartitionAlloc", |
| 32 "ProcessMemoryMetrics", | 32 "ProcessMemoryMetrics", |
| 33 "Skia", | 33 "Skia", |
| 34 "Sql", | 34 "Sql", |
| 35 "V8Isolate", | 35 "V8Isolate", |
| 36 "WinHeap", | 36 "WinHeap", |
| 37 "SyncDirectory", | 37 "SyncDirectory", |
| 38 "TabRestoreServiceHelper", |
| 38 nullptr // End of list marker. | 39 nullptr // End of list marker. |
| 39 }; | 40 }; |
| 40 | 41 |
| 41 // A list of string names that are allowed for the memory allocator dumps in | 42 // A list of string names that are allowed for the memory allocator dumps in |
| 42 // background mode. | 43 // background mode. |
| 43 const char* const kAllocatorDumpNameWhitelist[] = { | 44 const char* const kAllocatorDumpNameWhitelist[] = { |
| 44 "blink_gc", | 45 "blink_gc", |
| 45 "blink_gc/allocated_objects", | 46 "blink_gc/allocated_objects", |
| 46 "discardable", | 47 "discardable", |
| 47 "discardable/child_0x?", | 48 "discardable/child_0x?", |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 "sync/0x?/model_type/PRIORITY_PREFERENCE", | 118 "sync/0x?/model_type/PRIORITY_PREFERENCE", |
| 118 "sync/0x?/model_type/READING_LIST", | 119 "sync/0x?/model_type/READING_LIST", |
| 119 "sync/0x?/model_type/SEARCH_ENGINE", | 120 "sync/0x?/model_type/SEARCH_ENGINE", |
| 120 "sync/0x?/model_type/SESSION", | 121 "sync/0x?/model_type/SESSION", |
| 121 "sync/0x?/model_type/SYNCED_NOTIFICATION", | 122 "sync/0x?/model_type/SYNCED_NOTIFICATION", |
| 122 "sync/0x?/model_type/SYNCED_NOTIFICATION_APP_INFO", | 123 "sync/0x?/model_type/SYNCED_NOTIFICATION_APP_INFO", |
| 123 "sync/0x?/model_type/THEME", | 124 "sync/0x?/model_type/THEME", |
| 124 "sync/0x?/model_type/TYPED_URL", | 125 "sync/0x?/model_type/TYPED_URL", |
| 125 "sync/0x?/model_type/WALLET_METADATA", | 126 "sync/0x?/model_type/WALLET_METADATA", |
| 126 "sync/0x?/model_type/WIFI_CREDENTIAL", | 127 "sync/0x?/model_type/WIFI_CREDENTIAL", |
| 128 "tab_restore/service_helper_0x?/entries", |
| 129 "tab_restore/service_helper_0x?/entries/tab_0x?", |
| 130 "tab_restore/service_helper_0x?/entries/window_0x?", |
| 127 nullptr // End of list marker. | 131 nullptr // End of list marker. |
| 128 }; | 132 }; |
| 129 | 133 |
| 130 const char* const* g_dump_provider_whitelist = kDumpProviderWhitelist; | 134 const char* const* g_dump_provider_whitelist = kDumpProviderWhitelist; |
| 131 const char* const* g_allocator_dump_name_whitelist = | 135 const char* const* g_allocator_dump_name_whitelist = |
| 132 kAllocatorDumpNameWhitelist; | 136 kAllocatorDumpNameWhitelist; |
| 133 | 137 |
| 134 } // namespace | 138 } // namespace |
| 135 | 139 |
| 136 bool IsMemoryDumpProviderWhitelisted(const char* mdp_name) { | 140 bool IsMemoryDumpProviderWhitelisted(const char* mdp_name) { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 void SetDumpProviderWhitelistForTesting(const char* const* list) { | 176 void SetDumpProviderWhitelistForTesting(const char* const* list) { |
| 173 g_dump_provider_whitelist = list; | 177 g_dump_provider_whitelist = list; |
| 174 } | 178 } |
| 175 | 179 |
| 176 void SetAllocatorDumpNameWhitelistForTesting(const char* const* list) { | 180 void SetAllocatorDumpNameWhitelistForTesting(const char* const* list) { |
| 177 g_allocator_dump_name_whitelist = list; | 181 g_allocator_dump_name_whitelist = list; |
| 178 } | 182 } |
| 179 | 183 |
| 180 } // namespace trace_event | 184 } // namespace trace_event |
| 181 } // namespace base | 185 } // namespace base |
| OLD | NEW |