Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: base/metrics/call_stack_profile_params.h

Issue 1318733007: Refactor CallStackProfile::Params into base/ for use over IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/metrics/BUILD.gn ('k') | base/metrics/call_stack_profile_params.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « base/metrics/BUILD.gn ('k') | base/metrics/call_stack_profile_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698