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

Unified Diff: base/trace_event/memory_infra_background_whitelist.cc

Issue 2012883003: [tracing] Set whitelist values for dump provider supporting background mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@background_dump_names
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/trace_event/process_memory_dump_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ba28d4404c3455cf02c65177dba9ce70e7895e80 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_",
+ "dom_storage/cache_size",
+ "dom_storage/session_storage_",
+ "javaheap",
+ "javaheap/allocated_objects",
+ "leveldb/index_db/",
+ "leveldb/value_store/Extensions.Database.Open.Settings/",
+ "leveldb/value_store/Extensions.Database.Open.Rules/",
+ "leveldb/value_store/Extensions.Database.Open.State/",
+ "leveldb/value_store/Extensions.Database.Open/",
+ "leveldb/value_store/Extensions.Database.Restore/",
+ "leveldb/value_store/Extensions.Database.Value.Restore/",
+ "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",
+ "v/isolate_/heap_spaces",
+ "v/isolate_/heap_spaces/code_space",
+ "v/isolate_/heap_spaces/large_object_space",
+ "v/isolate_/heap_spaces/map_space",
+ "v/isolate_/heap_spaces/new_space",
+ "v/isolate_/heap_spaces/old_space",
+ "v/isolate_/heap_spaces/other_spaces",
+ "v/isolate_/malloc",
+ "v/isolate_/zapped_for_debug",
+ "winheap",
+ "winheap/allocated_objects",
nullptr // End of list marker.
};
@@ -61,8 +109,8 @@ bool IsMemoryAllocatorDumpNameWhitelisted(const std::string& name) {
if (i + 1 < length && name[i] == '0' && name[i + 1] == 'x') {
parsing_hex = true;
++i;
- } else if (isalpha(name[i]) ||
- (name[i] == '/' && stripped_str.back() != '/')) {
+ } else if (isalpha(name[i]) || ((ispunct(name[i]) || isblank(name[i])) &&
+ stripped_str.back() != '/')) {
// Do not add successive '/'(s) in |stripped_str|.
stripped_str.push_back(name[i]);
}
« no previous file with comments | « no previous file | base/trace_event/process_memory_dump_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698