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 <string> | |
Mike Wittman
2015/08/31 19:35:57
All these headers are unused, except for base/base
sydli
2015/08/31 20:09:42
Done.
| |
9 #include <vector> | |
10 | |
11 #include "base/base_export.h" | |
12 #include "base/profiler/stack_sampling_profiler.h" | |
13 #include "base/time/time.h" | |
14 | |
15 namespace base { | |
16 | |
17 // Stack profiling parameters for metrics collection. | |
18 struct BASE_EXPORT CallStackProfileParams { | |
19 enum Trigger { | |
20 UNKNOWN, | |
21 PROCESS_STARTUP, | |
22 JANKY_TASK, | |
23 THREAD_HUNG, | |
24 TRIGGER_LAST = THREAD_HUNG | |
25 }; | |
26 | |
27 // Default constructor to satisfy IPC macros. | |
28 CallStackProfileParams(); | |
Mike Wittman
2015/08/31 19:35:57
Is it possible to make this private, and friend th
sydli
2015/08/31 20:09:42
Not sure which IPC class uses this -- I'll update
| |
29 | |
30 // If unspecified, sets |preserve_sample_ordering| to false. | |
31 explicit CallStackProfileParams(Trigger trigger); | |
32 CallStackProfileParams(Trigger trigger, bool preserve_sample_ordering); | |
33 | |
34 // The triggering event. | |
35 Trigger trigger; | |
36 | |
37 // True if sample ordering is important and should be preserved when the | |
38 // associated profiles are compressed. This should only be set to true if | |
39 // the intended use of the requires that the sequence of call stacks within | |
40 // a particular profile be preserved. The default value of false provides | |
41 // better compression of the encoded profile and is sufficient for the | |
42 // typical use case of recording profiles for stack frequency analysis in | |
43 // aggregate. | |
44 bool preserve_sample_ordering; | |
45 }; | |
46 | |
47 } // namespace base | |
48 | |
49 #endif // BASE_METRICS_CALL_STACK_PROFILE_PARAMS_H_ | |
OLD | NEW |