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

Unified Diff: content/common/profiled_stack_state.h

Issue 1325653003: Type change in StackSamplingProfiler from void* to uintptr_t. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@UMA2_refactor
Patch Set: Addressed wittman's comments. Created 5 years, 3 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
Index: content/common/profiled_stack_state.h
diff --git a/content/common/profiled_stack_state.h b/content/common/profiled_stack_state.h
new file mode 100644
index 0000000000000000000000000000000000000000..cc6971818ec3ab79eaee89450df615a5402e8639
--- /dev/null
+++ b/content/common/profiled_stack_state.h
@@ -0,0 +1,55 @@
+// 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 CONTENT_COMMON_PROFILED_STACK_STATE_H_
+#define CONTENT_COMMON_PROFILED_STACK_STATE_H_
+
+#include "base/profiler/stack_sampling_profiler.h"
+#include "base/time/time.h"
+#include "content/common/content_export.h"
+
+namespace content {
+
+// Profiled stacks and related metrics provider parameters
+// to send to UMA. Duplicated Trigger enum for IPC usage.
+struct CONTENT_EXPORT ProfiledStackState {
+ // This enum should be kept in sync with
+ // components/metrics/call_stack_profile_metrics_provider.h
+ enum Trigger {
+ UNKNOWN,
+ PROCESS_STARTUP,
+ JANKY_TASK,
+ THREAD_HUNG,
+ TRIGGER_LAST = THREAD_HUNG
+ };
+
+ ProfiledStackState(
+ Trigger trigger,
+ bool preserve_sample_ordering,
+ base::TimeTicks start_timestamp,
+ const base::StackSamplingProfiler::CallStackProfiles& profiles);
+
+ // Default constructor and exposed to satisfy IPC macros.
Mike Wittman 2015/09/03 18:16:36 nit: is exposed
sydli 2015/09/09 17:08:45 Done.
+ // Do not use explicitly.
+ ProfiledStackState();
robliao 2015/09/03 22:25:59 You can make this private with a friend class, but
sydli 2015/09/09 17:08:45 Thanks for looking into this!
+
+ ~ProfiledStackState();
+
+ // The triggering event.
+ Trigger trigger;
+
+ // True if sample ordering is important and should be preserved when the
+ // associated profiles are compressed.
+ bool preserve_sample_ordering;
+
+ // Time of profiling start.
+ base::TimeTicks start_timestamp;
+
+ // Collected stack profiles.
+ base::StackSamplingProfiler::CallStackProfiles profiles;
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_PROFILED_STACK_STATE_H_

Powered by Google App Engine
This is Rietveld 408576698