OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_TRACE_CONFIG_MEMORY_TEST_UTIL_H_ | 5 #ifndef BASE_TRACE_EVENT_TRACE_CONFIG_MEMORY_TEST_UTIL_H_ |
6 #define BASE_TRACE_EVENT_TRACE_CONFIG_MEMORY_TEST_UTIL_H_ | 6 #define BASE_TRACE_EVENT_TRACE_CONFIG_MEMORY_TEST_UTIL_H_ |
7 | 7 |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "base/trace_event/memory_dump_manager.h" | 9 #include "base/trace_event/memory_dump_manager.h" |
10 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 "{" | 64 "{" |
65 "\"enable_argument_filter\":false," | 65 "\"enable_argument_filter\":false," |
66 "\"enable_sampling\":false," | 66 "\"enable_sampling\":false," |
67 "\"enable_systrace\":false," | 67 "\"enable_systrace\":false," |
68 "\"included_categories\":[" | 68 "\"included_categories\":[" |
69 "\"%s\"" | 69 "\"%s\"" |
70 "]," | 70 "]," |
71 "\"record_mode\":\"record-until-full\"" | 71 "\"record_mode\":\"record-until-full\"" |
72 "}", MemoryDumpManager::kTraceCategory); | 72 "}", MemoryDumpManager::kTraceCategory); |
73 } | 73 } |
| 74 |
| 75 static std::string GetTraceConfig_BackgroundTrigger() { |
| 76 return StringPrintf( |
| 77 "{" |
| 78 "\"enable_argument_filter\":false," |
| 79 "\"enable_sampling\":false," |
| 80 "\"enable_systrace\":false," |
| 81 "\"included_categories\":[" |
| 82 "\"%s\"" |
| 83 "]," |
| 84 "\"memory_dump_config\":{" |
| 85 "\"triggers\":[" |
| 86 "{" |
| 87 "\"mode\":\"background\"," |
| 88 "\"periodic_interval_ms\":1" |
| 89 "}" |
| 90 "]" |
| 91 "}," |
| 92 "\"record_mode\":\"record-until-full\"" |
| 93 "}", MemoryDumpManager::kTraceCategory); |
| 94 } |
74 }; | 95 }; |
75 | 96 |
76 } // namespace trace_event | 97 } // namespace trace_event |
77 } // namespace base | 98 } // namespace base |
78 | 99 |
79 #endif // BASE_TRACE_EVENT_TRACE_CONFIG_MEMORY_TEST_UTIL_H_ | 100 #endif // BASE_TRACE_EVENT_TRACE_CONFIG_MEMORY_TEST_UTIL_H_ |
OLD | NEW |