OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef BASE_METRICS_CALL_STACK_PROFILE_PARAMS_H_ |
| 6 #define BASE_METRICS_CALL_STACK_PROFILE_PARAMS_H_ |
| 7 |
| 8 #include "base/base_export.h" |
| 9 |
| 10 namespace base { |
| 11 |
| 12 // Stack profiling parameters for metrics collection. |
| 13 struct BASE_EXPORT CallStackProfileParams { |
| 14 enum Trigger { |
| 15 UNKNOWN, |
| 16 PROCESS_STARTUP, |
| 17 JANKY_TASK, |
| 18 THREAD_HUNG, |
| 19 TRIGGER_LAST = THREAD_HUNG |
| 20 }; |
| 21 |
| 22 // If unspecified, sets |preserve_sample_ordering| to false. |
| 23 explicit CallStackProfileParams(Trigger trigger); |
| 24 CallStackProfileParams(Trigger trigger, bool preserve_sample_ordering); |
| 25 |
| 26 // Default constructor exposed to satisfy IPC macros. Do not use explicitly. |
| 27 CallStackProfileParams(); |
| 28 |
| 29 // The triggering event. |
| 30 Trigger trigger; |
| 31 |
| 32 // True if sample ordering is important and should be preserved when the |
| 33 // associated profiles are compressed. This should only be set to true if |
| 34 // the intended use of the requires that the sequence of call stacks within |
| 35 // a particular profile be preserved. The default value of false provides |
| 36 // better compression of the encoded profile and is sufficient for the |
| 37 // typical use case of recording profiles for stack frequency analysis in |
| 38 // aggregate. |
| 39 bool preserve_sample_ordering; |
| 40 }; |
| 41 |
| 42 } // namespace base |
| 43 |
| 44 #endif // BASE_METRICS_CALL_STACK_PROFILE_PARAMS_H_ |
OLD | NEW |