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

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

Issue 1911643002: Add configurable limit to allocations in heap profiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Whitespace change Created 4 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
« no previous file with comments | « base/trace_event/trace_config.cc ('k') | base/trace_event/trace_config_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 namespace base { 11 namespace base {
12 namespace trace_event { 12 namespace trace_event {
13 13
14 class TraceConfigMemoryTestUtil { 14 class TraceConfigMemoryTestUtil {
15 public: 15 public:
16 static std::string GetTraceConfig_PeriodicTriggers(int light_period, 16 static std::string GetTraceConfig_PeriodicTriggers(int light_period,
17 int heavy_period) { 17 int heavy_period) {
18 return StringPrintf( 18 return StringPrintf(
19 "{" 19 "{"
20 "\"enable_argument_filter\":false," 20 "\"enable_argument_filter\":false,"
21 "\"enable_sampling\":false," 21 "\"enable_sampling\":false,"
22 "\"enable_systrace\":false," 22 "\"enable_systrace\":false,"
23 "\"included_categories\":[" 23 "\"included_categories\":["
24 "\"%s\"" 24 "\"%s\""
25 "]," 25 "],"
26 "\"memory_dump_config\":{" 26 "\"memory_dump_config\":{"
27 "\"triggers\":[" 27 "\"heap_profiler_options\":{"
28 "\"breakdown_threshold_bytes\":2048"
29 "},"
30 "\"triggers\":["
28 "{" 31 "{"
29 "\"mode\":\"light\"," 32 "\"mode\":\"light\","
30 "\"periodic_interval_ms\":%d" 33 "\"periodic_interval_ms\":%d"
31 "}," 34 "},"
32 "{" 35 "{"
33 "\"mode\":\"detailed\"," 36 "\"mode\":\"detailed\","
34 "\"periodic_interval_ms\":%d" 37 "\"periodic_interval_ms\":%d"
35 "}" 38 "}"
36 "]" 39 "]"
37 "}," 40 "},"
(...skipping 29 matching lines...) Expand all
67 "]," 70 "],"
68 "\"record_mode\":\"record-until-full\"" 71 "\"record_mode\":\"record-until-full\""
69 "}", MemoryDumpManager::kTraceCategory); 72 "}", MemoryDumpManager::kTraceCategory);
70 } 73 }
71 }; 74 };
72 75
73 } // namespace trace_event 76 } // namespace trace_event
74 } // namespace base 77 } // namespace base
75 78
76 #endif // BASE_TRACE_EVENT_TRACE_CONFIG_MEMORY_TEST_UTIL_H_ 79 #endif // BASE_TRACE_EVENT_TRACE_CONFIG_MEMORY_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « base/trace_event/trace_config.cc ('k') | base/trace_event/trace_config_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698