| 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..1f116dd957fbef21324517ba7edf0a7ca4d01b74
|
| --- /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 is exposed to satisfy IPC macros.
|
| + // Do not use explicitly.
|
| + ProfiledStackState();
|
| +
|
| + ~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_
|
|
|