mesa/src/intel/ds/intel_pps_perf.h
José Roberto de Souza 4b179e7bea intel/ds: Nuke ralloc_ctx and ralloc_cfg
Now that perf config and context are freed we don't need this rallocs
contexts.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29077>
2024-05-07 21:44:34 +00:00

45 lines
919 B
C++

/*
* Copyright © 2021 Collabora, Ltd.
* Author: Antonio Caggiano <antonio.caggiano@collabora.com>
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <optional>
#include <string>
#include <vector>
#include "dev/intel_device_info.h"
#include "perf/intel_perf.h"
#include "perf/intel_perf_query.h"
namespace pps
{
class IntelPerf
{
public:
IntelPerf(int drm_fd);
~IntelPerf();
std::vector<struct intel_perf_query_info*> get_queries() const;
bool open(uint64_t sampling_period_ns, struct intel_perf_query_info *query);
void close();
bool oa_stream_ready() const;
ssize_t read_oa_stream(void *buf, size_t bytes) const;
int drm_fd = -1;
struct intel_perf_context *ctx = nullptr;
struct intel_perf_config *cfg = nullptr;
// Accumulations are stored here
struct intel_perf_query_result result = {};
struct intel_device_info devinfo = {};
};
} // namespace pps