Avi Drissman | 8ba1bad | 2022-09-13 19:22:36 | [diff] [blame] | 1 | // Copyright 2018 The Chromium Authors |
Xi Cheng | 74c06d86 | 2018-08-16 01:06:48 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Caitlin Fischer | 0eedde44 | 2023-12-04 18:03:26 | [diff] [blame^] | 5 | #ifndef COMPONENTS_METRICS_CALL_STACKS_CALL_STACK_PROFILE_ENCODING_H_ |
| 6 | #define COMPONENTS_METRICS_CALL_STACKS_CALL_STACK_PROFILE_ENCODING_H_ |
Xi Cheng | 74c06d86 | 2018-08-16 01:06:48 | [diff] [blame] | 7 | |
Caitlin Fischer | 0eedde44 | 2023-12-04 18:03:26 | [diff] [blame^] | 8 | #include "components/metrics/call_stacks/call_stack_profile_params.h" |
Xi Cheng | 74c06d86 | 2018-08-16 01:06:48 | [diff] [blame] | 9 | #include "third_party/metrics_proto/sampled_profile.pb.h" |
| 10 | |
| 11 | namespace metrics { |
| 12 | |
| 13 | // Translates CallStackProfileParams's process to the corresponding execution |
| 14 | // context Process. |
| 15 | Process ToExecutionContextProcess(CallStackProfileParams::Process process); |
| 16 | |
| 17 | // Translates CallStackProfileParams's thread to the corresponding |
| 18 | // SampledProfile Thread. |
| 19 | Thread ToExecutionContextThread(CallStackProfileParams::Thread thread); |
| 20 | |
| 21 | // Translates CallStackProfileParams's trigger to the corresponding |
| 22 | // SampledProfile TriggerEvent. |
| 23 | SampledProfile::TriggerEvent ToSampledProfileTriggerEvent( |
| 24 | CallStackProfileParams::Trigger trigger); |
| 25 | |
| 26 | } // namespace metrics |
| 27 | |
Caitlin Fischer | 0eedde44 | 2023-12-04 18:03:26 | [diff] [blame^] | 28 | #endif // COMPONENTS_METRICS_CALL_STACKS_CALL_STACK_PROFILE_ENCODING_H_ |