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

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

Issue 2876543002: memory-infra: Don't invoke all dump providers in SUMMARY_ONLY mode (Closed)
Patch Set: address comments Created 3 years, 7 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
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 #ifndef BASE_TRACE_EVENT_MEMORY_INFRA_BACKGROUND_WHITELIST_H_ 5 #ifndef BASE_TRACE_EVENT_MEMORY_INFRA_BACKGROUND_WHITELIST_H_
6 #define BASE_TRACE_EVENT_MEMORY_INFRA_BACKGROUND_WHITELIST_H_ 6 #define BASE_TRACE_EVENT_MEMORY_INFRA_BACKGROUND_WHITELIST_H_
7 7
8 // This file contains the whitelists for background mode to limit the tracing 8 // This file contains the whitelists for background mode to limit the tracing
9 // overhead and remove sensitive information from traces. 9 // overhead and remove sensitive information from traces.
10 10
11 #include <string> 11 #include <string>
12 12
13 #include "base/base_export.h" 13 #include "base/base_export.h"
14 14
15 namespace base { 15 namespace base {
16 namespace trace_event { 16 namespace trace_event {
17 17
18 // Checks if the given |mdp_name| is in the whitelist. 18 // Checks if the given |mdp_name| is in the whitelist.
19 bool BASE_EXPORT IsMemoryDumpProviderWhitelisted(const char* mdp_name); 19 bool BASE_EXPORT IsMemoryDumpProviderWhitelisted(const char* mdp_name);
20 20
21 // Checks if the given |mdp_name| is required for summary dumps.
22 bool BASE_EXPORT
23 IsMemoryDumpProviderWhitelistedForSummary(const char* mdp_name);
24
21 // Checks if the given |name| matches any of the whitelisted patterns. 25 // Checks if the given |name| matches any of the whitelisted patterns.
22 bool BASE_EXPORT IsMemoryAllocatorDumpNameWhitelisted(const std::string& name); 26 bool BASE_EXPORT IsMemoryAllocatorDumpNameWhitelisted(const std::string& name);
23 27
24 // The whitelist is replaced with the given list for tests. The last element of 28 // The whitelist is replaced with the given list for tests. The last element of
25 // the list must be nullptr. 29 // the list must be nullptr.
26 void BASE_EXPORT SetDumpProviderWhitelistForTesting(const char* const* list); 30 void BASE_EXPORT SetDumpProviderWhitelistForTesting(const char* const* list);
27 void BASE_EXPORT 31 void BASE_EXPORT
32 SetDumpProviderSummaryWhitelistForTesting(const char* const* list);
33 void BASE_EXPORT
28 SetAllocatorDumpNameWhitelistForTesting(const char* const* list); 34 SetAllocatorDumpNameWhitelistForTesting(const char* const* list);
29 35
30 } // namespace trace_event 36 } // namespace trace_event
31 } // namespace base 37 } // namespace base
32 38
33 #endif // BASE_TRACE_EVENT_MEMORY_INFRA_BACKGROUND_WHITELIST_H_ 39 #endif // BASE_TRACE_EVENT_MEMORY_INFRA_BACKGROUND_WHITELIST_H_
OLDNEW
« no previous file with comments | « base/trace_event/memory_dump_provider_info.cc ('k') | base/trace_event/memory_infra_background_whitelist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698