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 #include "chrome/browser/tracing/navigation_tracing.h" | 5 #include "chrome/browser/tracing/navigation_tracing.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 | 63 |
64 std::unique_ptr<base::ListValue> rules_list(new base::ListValue()); | 64 std::unique_ptr<base::ListValue> rules_list(new base::ListValue()); |
65 { | 65 { |
66 std::unique_ptr<base::DictionaryValue> rules_dict( | 66 std::unique_ptr<base::DictionaryValue> rules_dict( |
67 new base::DictionaryValue()); | 67 new base::DictionaryValue()); |
68 rules_dict->SetString("rule", "TRACE_ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL"); | 68 rules_dict->SetString("rule", "TRACE_ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL"); |
69 rules_dict->SetString("trigger_name", kNavigationTracingConfig); | 69 rules_dict->SetString("trigger_name", kNavigationTracingConfig); |
70 rules_dict->SetString("category", "BENCHMARK_DEEP"); | 70 rules_dict->SetString("category", "BENCHMARK_DEEP"); |
71 rules_list->Append(std::move(rules_dict)); | 71 rules_list->Append(std::move(rules_dict)); |
72 } | 72 } |
73 { | |
74 std::unique_ptr<base::DictionaryValue> rules_dict( | |
75 new base::DictionaryValue()); | |
76 rules_dict->SetString("rule", | |
77 "MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE"); | |
78 rules_dict->SetString("category", "BENCHMARK_MEMORY"); | |
ssid
2016/05/27 01:08:10
HEAVY
keishi
2016/05/27 04:29:07
Done.
| |
79 rules_dict->SetString("histogram_name", "V8.GCLowMemoryNotification"); | |
80 rules_dict->SetInteger("trigger_delay", 5); | |
81 rules_dict->SetInteger("histogram_lower_value", 0); | |
82 rules_dict->SetInteger("histogram_upper_value", 10000); | |
83 rules_list->Append(std::move(rules_dict)); | |
84 } | |
73 dict.Set("configs", std::move(rules_list)); | 85 dict.Set("configs", std::move(rules_list)); |
74 | 86 |
75 std::unique_ptr<content::BackgroundTracingConfig> config( | 87 std::unique_ptr<content::BackgroundTracingConfig> config( |
76 content::BackgroundTracingConfig::FromDict(&dict)); | 88 content::BackgroundTracingConfig::FromDict(&dict)); |
77 DCHECK(config); | 89 DCHECK(config); |
78 | 90 |
79 content::BackgroundTracingManager::GetInstance()->SetActiveScenario( | 91 content::BackgroundTracingManager::GetInstance()->SetActiveScenario( |
80 std::move(config), base::Bind(&UploadCallback), | 92 std::move(config), base::Bind(&UploadCallback), |
81 content::BackgroundTracingManager::NO_DATA_FILTERING); | 93 content::BackgroundTracingManager::NO_DATA_FILTERING); |
82 } | 94 } |
(...skipping 24 matching lines...) Expand all Loading... | |
107 content::BackgroundTracingManager::GetInstance()->TriggerNamedEvent( | 119 content::BackgroundTracingManager::GetInstance()->TriggerNamedEvent( |
108 navigation_handle, | 120 navigation_handle, |
109 content::BackgroundTracingManager::StartedFinalizingCallback()); | 121 content::BackgroundTracingManager::StartedFinalizingCallback()); |
110 } | 122 } |
111 } | 123 } |
112 | 124 |
113 content::BackgroundTracingManager::TriggerHandle | 125 content::BackgroundTracingManager::TriggerHandle |
114 NavigationTracingObserver::navigation_handle = -1; | 126 NavigationTracingObserver::navigation_handle = -1; |
115 | 127 |
116 } // namespace tracing | 128 } // namespace tracing |
OLD | NEW |