blob: 71b9a52bca2467bdb9e10edcfcaf93de2b955eed [file] [log] [blame]
Avi Drissman8ba1bad2022-09-13 19:22:361// Copyright 2018 The Chromium Authors
Xi Cheng74c06d862018-08-16 01:06:482// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Caitlin Fischer0eedde442023-12-04 18:03:265#ifndef COMPONENTS_METRICS_CALL_STACKS_CALL_STACK_PROFILE_ENCODING_H_
6#define COMPONENTS_METRICS_CALL_STACKS_CALL_STACK_PROFILE_ENCODING_H_
Xi Cheng74c06d862018-08-16 01:06:487
Jason Chase5ec7e7fc2024-09-26 02:38:498#include "components/sampling_profiler/call_stack_profile_params.h"
9#include "components/sampling_profiler/process_type.h"
Xi Cheng74c06d862018-08-16 01:06:4810#include "third_party/metrics_proto/sampled_profile.pb.h"
11
12namespace metrics {
13
14// Translates CallStackProfileParams's process to the corresponding execution
15// context Process.
Jason Chase5ec7e7fc2024-09-26 02:38:4916Process ToExecutionContextProcess(
17 sampling_profiler::ProfilerProcessType process);
Xi Cheng74c06d862018-08-16 01:06:4818
19// Translates CallStackProfileParams's thread to the corresponding
20// SampledProfile Thread.
Jason Chase5ec7e7fc2024-09-26 02:38:4921Thread ToExecutionContextThread(sampling_profiler::ProfilerThreadType thread);
Xi Cheng74c06d862018-08-16 01:06:4822
23// Translates CallStackProfileParams's trigger to the corresponding
24// SampledProfile TriggerEvent.
25SampledProfile::TriggerEvent ToSampledProfileTriggerEvent(
Jason Chase5ec7e7fc2024-09-26 02:38:4926 sampling_profiler::CallStackProfileParams::Trigger trigger);
Xi Cheng74c06d862018-08-16 01:06:4827
28} // namespace metrics
29
Caitlin Fischer0eedde442023-12-04 18:03:2630#endif // COMPONENTS_METRICS_CALL_STACKS_CALL_STACK_PROFILE_ENCODING_H_