• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2024 Intel Corporation
3  * SPDX-License-Identifier: MIT
4  */
5 
6 #pragma once
7 
8 #include <stdbool.h>
9 #include <stddef.h>
10 #include <stdint.h>
11 
12 struct intel_bind_timeline;
13 struct intel_perf_config;
14 struct intel_perf_registers;
15 
16 uint64_t xe_perf_get_oa_format(struct intel_perf_config *perf);
17 
18 bool xe_oa_metrics_available(struct intel_perf_config *perf, int fd, bool use_register_snapshots);
19 
20 uint64_t xe_add_config(struct intel_perf_config *perf, int fd, const struct intel_perf_registers *config, const char *guid);
21 void xe_remove_config(struct intel_perf_config *perf, int fd, uint64_t config_id);
22 
23 int xe_perf_stream_open(struct intel_perf_config *perf_config, int drm_fd,
24                         uint32_t exec_id, uint64_t metrics_set_id,
25                         uint64_t report_format, uint64_t period_exponent,
26                         bool hold_preemption, bool enable,
27                         struct intel_bind_timeline *timeline);
28 int xe_perf_stream_set_state(int perf_stream_fd, bool enable);
29 int xe_perf_stream_set_metrics_id(int perf_stream_fd, int drm_fd,
30                                   uint32_t exec_queue, uint64_t metrics_set_id,
31                                   struct intel_bind_timeline *timeline);
32 int xe_perf_stream_read_samples(struct intel_perf_config *perf_config, int perf_stream_fd,
33                                 uint8_t *buffer, size_t buffer_len);
34