Jim Flynn | 4c9ed1d | 2022-01-23 23:57:20 +0000 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2022 Arm Ltd and Contributors. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
Jim Flynn | 2776183 | 2022-03-20 21:52:17 +0000 | [diff] [blame] | 8 | #include "ILocalPacketHandler.hpp" |
Jim Flynn | 4c9ed1d | 2022-01-23 23:57:20 +0000 | [diff] [blame] | 9 | |
| 10 | #include <string> |
| 11 | #include <vector> |
| 12 | |
| 13 | namespace arm |
| 14 | { |
| 15 | namespace pipe |
| 16 | { |
| 17 | /// The lowest performance data capture interval we support is 10 miliseconds. |
| 18 | constexpr unsigned int LOWEST_CAPTURE_PERIOD = 10000u; |
Jim Flynn | 4c9ed1d | 2022-01-23 23:57:20 +0000 | [diff] [blame] | 19 | |
| 20 | struct ProfilingOptions { |
| 21 | ProfilingOptions() |
| 22 | : m_EnableProfiling(false), m_TimelineEnabled(false), m_OutgoingCaptureFile(""), |
| 23 | m_IncomingCaptureFile(""), m_FileOnly(false), m_CapturePeriod(arm::pipe::LOWEST_CAPTURE_PERIOD), |
| 24 | m_FileFormat("binary"), m_LocalPacketHandlers() {} |
| 25 | |
| 26 | /// Indicates whether external profiling is enabled or not. |
| 27 | bool m_EnableProfiling; |
| 28 | /// Indicates whether external timeline profiling is enabled or not. |
| 29 | bool m_TimelineEnabled; |
| 30 | /// Path to a file in which outgoing timeline profiling messages will be stored. |
| 31 | std::string m_OutgoingCaptureFile; |
| 32 | /// Path to a file in which incoming timeline profiling messages will be stored. |
| 33 | std::string m_IncomingCaptureFile; |
| 34 | /// Enable profiling output to file only. |
| 35 | bool m_FileOnly; |
| 36 | /// The duration at which captured profiling messages will be flushed. |
| 37 | uint32_t m_CapturePeriod; |
| 38 | /// The format of the file used for outputting profiling data. |
| 39 | std::string m_FileFormat; |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 40 | std::vector <ILocalPacketHandlerSharedPtr> m_LocalPacketHandlers; |
Jim Flynn | 4c9ed1d | 2022-01-23 23:57:20 +0000 | [diff] [blame] | 41 | }; |
| 42 | |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 43 | } // namespace pipe |
Jim Flynn | 4c9ed1d | 2022-01-23 23:57:20 +0000 | [diff] [blame] | 44 | |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 45 | } // namespace arm |