| Index: base/trace_event/memory_infra_background_whitelist.cc
|
| diff --git a/base/trace_event/memory_infra_background_whitelist.cc b/base/trace_event/memory_infra_background_whitelist.cc
|
| index 03dc108c076be2fa66c1b79a087ee2d419476112..aed187fa1d8e700b4a45669766f7dba824543d26 100644
|
| --- a/base/trace_event/memory_infra_background_whitelist.cc
|
| +++ b/base/trace_event/memory_infra_background_whitelist.cc
|
| @@ -17,15 +17,63 @@ namespace {
|
| // providers can be added here only if the background mode dump has very
|
| // less performance and memory overhead.
|
| const char* const kDumpProviderWhitelist[] = {
|
| - // TODO(ssid): Fill this list with dump provider names which support
|
| - // background mode, crbug.com/613198.
|
| + "BlinkGC",
|
| + "ChildDiscardableSharedMemoryManager",
|
| + "DOMStorage",
|
| + "HostDiscardableSharedMemoryManager",
|
| + "IndexedDBBackingStore",
|
| + "JavaHeap",
|
| + "LeveldbValueStore",
|
| + "Malloc",
|
| + "PartitionAlloc",
|
| + "ProcessMemoryMetrics",
|
| + "Skia",
|
| + "Sql",
|
| + "V8Isolate",
|
| + "WinHeap",
|
| nullptr // End of list marker.
|
| };
|
|
|
| // A list of string names that are allowed for the memory allocator dumps in
|
| // background mode.
|
| const char* const kAllocatorDumpNameWhitelist[] = {
|
| - // TODO(ssid): Fill this list with dump names, crbug.com/613198.
|
| + "blink_gc",
|
| + "blink_gc/allocated_objects",
|
| + "discardable",
|
| + "discardable/child_0x?",
|
| + "dom_storage/0x?/cache_size",
|
| + "dom_storage/session_storage_0x?",
|
| + "java_heap",
|
| + "java_heap/allocated_objects",
|
| + "leveldb/index_db/0x?",
|
| + "leveldb/value_store/Extensions.Database.Open.Settings/0x?",
|
| + "leveldb/value_store/Extensions.Database.Open.Rules/0x?",
|
| + "leveldb/value_store/Extensions.Database.Open.State/0x?",
|
| + "leveldb/value_store/Extensions.Database.Open/0x?",
|
| + "leveldb/value_store/Extensions.Database.Restore/0x?",
|
| + "leveldb/value_store/Extensions.Database.Value.Restore/0x?",
|
| + "malloc",
|
| + "malloc/allocated_objects",
|
| + "malloc/metadata_fragmentation_caches",
|
| + "partition_alloc/allocated_objects",
|
| + "partition_alloc/partitions",
|
| + "partition_alloc/partitions/buffer",
|
| + "partition_alloc/partitions/fast_malloc",
|
| + "partition_alloc/partitions/layout",
|
| + "skia/sk_glyph_cache",
|
| + "skia/sk_resource_cache",
|
| + "sqlite",
|
| + "v8/isolate_0x?/heap_spaces",
|
| + "v8/isolate_0x?/heap_spaces/code_space",
|
| + "v8/isolate_0x?/heap_spaces/large_object_space",
|
| + "v8/isolate_0x?/heap_spaces/map_space",
|
| + "v8/isolate_0x?/heap_spaces/new_space",
|
| + "v8/isolate_0x?/heap_spaces/old_space",
|
| + "v8/isolate_0x?/heap_spaces/other_spaces",
|
| + "v8/isolate_0x?/malloc",
|
| + "v8/isolate_0x?/zapped_for_debug",
|
| + "winheap",
|
| + "winheap/allocated_objects",
|
| nullptr // End of list marker.
|
| };
|
|
|
| @@ -51,19 +99,14 @@ bool IsMemoryAllocatorDumpNameWhitelisted(const std::string& name) {
|
| stripped_str.reserve(length);
|
| bool parsing_hex = false;
|
| for (size_t i = 0; i < length; ++i) {
|
| - if (parsing_hex) {
|
| - if (isxdigit(name[i])) {
|
| - continue;
|
| - } else {
|
| - parsing_hex = false;
|
| - }
|
| - }
|
| + if (parsing_hex && isxdigit(name[i]))
|
| + continue;
|
| + parsing_hex = false;
|
| if (i + 1 < length && name[i] == '0' && name[i + 1] == 'x') {
|
| parsing_hex = true;
|
| + stripped_str.append("0x?");
|
| ++i;
|
| - } else if (isalpha(name[i]) ||
|
| - (name[i] == '/' && stripped_str.back() != '/')) {
|
| - // Do not add successive '/'(s) in |stripped_str|.
|
| + } else {
|
| stripped_str.push_back(name[i]);
|
| }
|
| }
|
|
|