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_PROFILER_STACK_SAMPLING_PROFILER_H_ | 5 #ifndef BASE_PROFILER_STACK_SAMPLING_PROFILER_H_ |
6 #define BASE_PROFILER_STACK_SAMPLING_PROFILER_H_ | 6 #define BASE_PROFILER_STACK_SAMPLING_PROFILER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 PlatformThreadHandle sampling_thread_handle_; | 240 PlatformThreadHandle sampling_thread_handle_; |
241 | 241 |
242 const CompletedCallback completed_callback_; | 242 const CompletedCallback completed_callback_; |
243 | 243 |
244 // Stored until it can be passed to the NativeStackSampler created in Start(). | 244 // Stored until it can be passed to the NativeStackSampler created in Start(). |
245 NativeStackSamplerTestDelegate* const test_delegate_; | 245 NativeStackSamplerTestDelegate* const test_delegate_; |
246 | 246 |
247 DISALLOW_COPY_AND_ASSIGN(StackSamplingProfiler); | 247 DISALLOW_COPY_AND_ASSIGN(StackSamplingProfiler); |
248 }; | 248 }; |
249 | 249 |
250 // The metrics provider code wants to put Samples in a map and compare them, | 250 // These operators permit types to be compared and used in a map of Samples, as |
251 // which requires us to define a few operators. | 251 // done in tests and by the metrics provider code. |
| 252 BASE_EXPORT bool operator==(const StackSamplingProfiler::Module& a, |
| 253 const StackSamplingProfiler::Module& b); |
252 BASE_EXPORT bool operator==(const StackSamplingProfiler::Frame& a, | 254 BASE_EXPORT bool operator==(const StackSamplingProfiler::Frame& a, |
253 const StackSamplingProfiler::Frame& b); | 255 const StackSamplingProfiler::Frame& b); |
254 BASE_EXPORT bool operator<(const StackSamplingProfiler::Frame& a, | 256 BASE_EXPORT bool operator<(const StackSamplingProfiler::Frame& a, |
255 const StackSamplingProfiler::Frame& b); | 257 const StackSamplingProfiler::Frame& b); |
256 | 258 |
257 } // namespace base | 259 } // namespace base |
258 | 260 |
259 #endif // BASE_PROFILER_STACK_SAMPLING_PROFILER_H_ | 261 #endif // BASE_PROFILER_STACK_SAMPLING_PROFILER_H_ |
OLD | NEW |