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 ae74322040f45043af0183f8fda5b32223910170..524a3d6192a69a5a181fb7a02f276120b313158c 100644 |
--- a/base/trace_event/memory_infra_background_whitelist.cc |
+++ b/base/trace_event/memory_infra_background_whitelist.cc |
@@ -69,10 +69,12 @@ const char* const kAllocatorDumpNameWhitelist[] = { |
"net/http_network_session_0x?/stream_factory", |
"net/sdch_manager_0x?", |
"net/ssl_session_cache", |
- "net/url_request_context_0x?", |
- "net/url_request_context_0x?/http_cache", |
- "net/url_request_context_0x?/http_network_session", |
- "net/url_request_context_0x?/sdch_manager", |
+ "net/url_request_context", |
+ "net/url_request_context/%s", |
+ "net/url_request_context/%s/0x?", |
+ "net/url_request_context/%s/0x?/http_cache", |
+ "net/url_request_context/%s/0x?/http_network_session", |
+ "net/url_request_context/%s/0x?/sdch_manager", |
"web_cache/Image_resources", |
"web_cache/CSS stylesheet_resources", |
"web_cache/Script_resources", |
@@ -178,6 +180,16 @@ bool IsMemoryAllocatorDumpNameWhitelisted(const std::string& name) { |
} |
} |
+ std::string url_request_context_prefix = "url_request_context/"; |
+ size_t pos = stripped_str.find(url_request_context_prefix); |
+ if (pos != std::string::npos) { |
+ size_t replace_start = pos + url_request_context_prefix.length(); |
+ size_t replace_end = stripped_str.find('\\', replace_start); |
+ if (replace_end == std::string::npos) |
+ replace_end = stripped_str.length(); |
+ stripped_str.replace(replace_start, replace_end - pos, "%s"); |
ssid
2017/03/27 23:02:34
No this is exactly what we are trying to avoid in
xunjieli
2017/03/28 01:04:56
Done.
Just to clarify: URLRequestContext is the
|
+ } |
+ |
for (size_t i = 0; g_allocator_dump_name_whitelist[i] != nullptr; ++i) { |
if (stripped_str == g_allocator_dump_name_whitelist[i]) { |
return true; |