blob: 30d383d92ef3b0f3eafd70533cac039777d696d5 [file] [log] [blame]
Jim Flynn4c9ed1d2022-01-23 23:57:20 +00001//
2// Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6#pragma once
7
Jim Flynn27761832022-03-20 21:52:17 +00008#include "ILocalPacketHandler.hpp"
Jim Flynn4c9ed1d2022-01-23 23:57:20 +00009
10#include <string>
11#include <vector>
12
13namespace arm
14{
15namespace pipe
16{
17/// The lowest performance data capture interval we support is 10 miliseconds.
18constexpr unsigned int LOWEST_CAPTURE_PERIOD = 10000u;
Jim Flynn4c9ed1d2022-01-23 23:57:20 +000019
20struct 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 Corbett5aa9fd72022-02-25 15:33:28 +000040 std::vector <ILocalPacketHandlerSharedPtr> m_LocalPacketHandlers;
Jim Flynn4c9ed1d2022-01-23 23:57:20 +000041};
42
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000043} // namespace pipe
Jim Flynn4c9ed1d2022-01-23 23:57:20 +000044
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000045} // namespace arm