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