Index: base/metrics/call_stack_profile_params.h |
diff --git a/base/metrics/call_stack_profile_params.h b/base/metrics/call_stack_profile_params.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1207cf4bb9651c2af2e648efadf0ed1e5c62d2a5 |
--- /dev/null |
+++ b/base/metrics/call_stack_profile_params.h |
@@ -0,0 +1,44 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef BASE_METRICS_CALL_STACK_PROFILE_PARAMS_H_ |
+#define BASE_METRICS_CALL_STACK_PROFILE_PARAMS_H_ |
+ |
+#include "base/base_export.h" |
+ |
+namespace base { |
+ |
+// Stack profiling parameters for metrics collection. |
+struct BASE_EXPORT CallStackProfileParams { |
Alexei Svitkine (slow)
2015/09/01 14:54:33
Sorry, but to me this seems really out of place in
sydli
2015/09/01 16:39:42
Some processes we'd like to profile (eg GPU) live
|
+ enum Trigger { |
+ UNKNOWN, |
+ PROCESS_STARTUP, |
+ JANKY_TASK, |
+ THREAD_HUNG, |
+ TRIGGER_LAST = THREAD_HUNG |
+ }; |
+ |
+ // If unspecified, sets |preserve_sample_ordering| to false. |
+ explicit CallStackProfileParams(Trigger trigger); |
+ CallStackProfileParams(Trigger trigger, bool preserve_sample_ordering); |
+ |
+ // Default constructor exposed to satisfy IPC macros. Do not use explicitly. |
+ CallStackProfileParams(); |
+ |
+ // The triggering event. |
+ Trigger trigger; |
+ |
+ // True if sample ordering is important and should be preserved when the |
+ // associated profiles are compressed. This should only be set to true if |
+ // the intended use of the requires that the sequence of call stacks within |
+ // a particular profile be preserved. The default value of false provides |
+ // better compression of the encoded profile and is sufficient for the |
+ // typical use case of recording profiles for stack frequency analysis in |
+ // aggregate. |
+ bool preserve_sample_ordering; |
+}; |
+ |
+} // namespace base |
+ |
+#endif // BASE_METRICS_CALL_STACK_PROFILE_PARAMS_H_ |