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 "base/profiler/stack_sampling_profiler.h" | 5 #include "base/profiler/stack_sampling_profiler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
14 #include "base/location.h" | 14 #include "base/location.h" |
| 15 #include "base/macros.h" |
15 #include "base/profiler/native_stack_sampler.h" | 16 #include "base/profiler/native_stack_sampler.h" |
16 #include "base/synchronization/lock.h" | 17 #include "base/synchronization/lock.h" |
17 #include "base/thread_task_runner_handle.h" | 18 #include "base/thread_task_runner_handle.h" |
18 #include "base/timer/elapsed_timer.h" | 19 #include "base/timer/elapsed_timer.h" |
19 | 20 |
20 namespace base { | 21 namespace base { |
21 | 22 |
22 namespace { | 23 namespace { |
23 | 24 |
24 // Used to ensure only one profiler is running at a time. | 25 // Used to ensure only one profiler is running at a time. |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 } | 278 } |
278 | 279 |
279 bool operator<(const StackSamplingProfiler::Frame &a, | 280 bool operator<(const StackSamplingProfiler::Frame &a, |
280 const StackSamplingProfiler::Frame &b) { | 281 const StackSamplingProfiler::Frame &b) { |
281 return (a.module_index < b.module_index) || | 282 return (a.module_index < b.module_index) || |
282 (a.module_index == b.module_index && | 283 (a.module_index == b.module_index && |
283 a.instruction_pointer < b.instruction_pointer); | 284 a.instruction_pointer < b.instruction_pointer); |
284 } | 285 } |
285 | 286 |
286 } // namespace base | 287 } // namespace base |
OLD | NEW |