OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/performance_monitor/process_metrics_history.h" | 5 #include "chrome/browser/performance_monitor/process_metrics_history.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
11 #include "base/process/process_metrics.h" | 11 #include "base/process/process_metrics.h" |
| 12 #include "build/build_config.h" |
12 #include "content/public/common/process_type.h" | 13 #include "content/public/common/process_type.h" |
13 | 14 |
14 #if defined(OS_MACOSX) | 15 #if defined(OS_MACOSX) |
15 #include "content/public/browser/browser_child_process_host.h" | 16 #include "content/public/browser/browser_child_process_host.h" |
16 #endif | 17 #endif |
17 | 18 |
18 namespace performance_monitor { | 19 namespace performance_monitor { |
19 | 20 |
20 namespace { | 21 namespace { |
21 | 22 |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 172 |
172 if (cpu_usage_ > kHighCPUUtilizationThreshold && | 173 if (cpu_usage_ > kHighCPUUtilizationThreshold && |
173 trace_trigger_handle_ != -1) { | 174 trace_trigger_handle_ != -1) { |
174 content::BackgroundTracingManager::GetInstance()->TriggerNamedEvent( | 175 content::BackgroundTracingManager::GetInstance()->TriggerNamedEvent( |
175 trace_trigger_handle_, | 176 trace_trigger_handle_, |
176 content::BackgroundTracingManager::StartedFinalizingCallback()); | 177 content::BackgroundTracingManager::StartedFinalizingCallback()); |
177 } | 178 } |
178 } | 179 } |
179 | 180 |
180 } // namespace performance_monitor | 181 } // namespace performance_monitor |
OLD | NEW |