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

Side by Side Diff: base/trace_event/memory_infra_background_whitelist.cc

Issue 2674203003: [memory-infra] Whitelist TabRestoreService MDP. (Closed)
Patch Set: Fix tests Created 3 years, 10 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 | « no previous file | components/sessions/core/tab_restore_service_helper.cc » ('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 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
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
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
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
OLDNEW
« no previous file with comments | « no previous file | components/sessions/core/tab_restore_service_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698