Path: blob/21.2-virgl/src/intel/ds/intel_pps_perf.h
4547 views
/*1* Copyright © 2021 Collabora, Ltd.2* Author: Antonio Caggiano <[email protected]>3*4* SPDX-License-Identifier: MIT5*/67#pragma once89#include <optional>10#include <string>11#include <vector>1213#include <intel/dev/intel_device_info.h>14#include <intel/perf/intel_perf.h>15#include <intel/perf/intel_perf_query.h>1617namespace pps18{19int perf_ioctl(int fd, unsigned long request, void *arg);2021class IntelPerf22{23public:24IntelPerf(int drm_fd);2526IntelPerf(const IntelPerf &) = delete;27IntelPerf &operator=(const IntelPerf &) = delete;2829IntelPerf(IntelPerf &&);30IntelPerf &operator=(IntelPerf &&) noexcept;3132~IntelPerf();3334std::optional<struct intel_perf_query_info> find_query_by_name(const std::string &name) const;3536std::vector<struct intel_perf_query_info*> get_queries() const;3738bool open(uint64_t sampling_period_ns);39void close();4041bool oa_stream_ready() const;42ssize_t read_oa_stream(void *buf, size_t bytes) const;4344int drm_fd = -1;4546void *ralloc_ctx = nullptr;47void *ralloc_cfg = nullptr;4849struct intel_perf_context *ctx = nullptr;50struct intel_perf_config *cfg = nullptr;5152struct intel_device_info devinfo = {};5354std::optional<struct intel_perf_query_info> query = std::nullopt;55};5657} // namespace pps585960